diff --git a/policycoreutils/sctp_test/runtest.sh b/policycoreutils/sctp_test/runtest.sh index d8f386c..0f93d6f 100755 --- a/policycoreutils/sctp_test/runtest.sh +++ b/policycoreutils/sctp_test/runtest.sh @@ -53,7 +53,6 @@ rlJournalStart rlRun "semodule -i userapp.cil" 0 "Loading custom policy module" rlRun "chcon -t userapp_exec_t `which sctp_test`" 0 "Change file context of sctp_test" OUTPUT_FILE=`mktemp` - rlRun "chcon -t tmp_t ${OUTPUT_FILE}" rlRun "setenforce 1" rlRun "sestatus" rlPhaseEnd @@ -63,11 +62,12 @@ rlJournalStart rlRun "semanage port -a -t ${PORT_TYPE} -p sctp ${CLIENT_PORT}" 0 rlRun "sctp_test -H localhost -P ${SERVER_PORT} -l 2>&1 > ${OUTPUT_FILE} &" 0 rlRun "sctp_test -H localhost -P ${CLIENT_PORT} -h localhost -p ${SERVER_PORT} -s" 0 - rlAssertGrep "recvmsg" ${OUTPUT_FILE} -i + rlRun "grep 'recvmsg' ${OUTPUT_FILE} -i" 0 + if [ $? -ne 0 ]; cat ${OUTPUT_FILE}; fi rlPhaseEnd rlPhaseStartCleanup - rlRun "rm ${OUTPUT_FILE}" + rlRun "rm -f ${OUTPUT_FILE}" rlRun "killall sctp_test" rlRun "semanage port -D" rlRun "semodule -r userapp" diff --git a/policycoreutils/sctp_test/userapp.cil b/policycoreutils/sctp_test/userapp.cil index 88e065e..4a5114a 100644 --- a/policycoreutils/sctp_test/userapp.cil +++ b/policycoreutils/sctp_test/userapp.cil @@ -36,5 +36,6 @@ (allow userapp_t userapp_exec_t (file (map))) (allow userapp_t userapp_exec_t (file (entrypoint execute read))) (allow userapp_t kernel_t (system (module_request))) +(allow userapp_t user_tmp_t (file (getattr open write append)))