Based on a patch by John Johansen <[email protected]>

(I converted the check to look for the process directory in /proc
rather than sending signal 0 to the task, as John had done in a patch
sent to me, to prevent failures in signal delivery from blocking the
check from working correctly.)

Signed-off-by: Steve Beattie <[email protected]>
---
 tests/regression/apparmor/onexec.sh |    6 ++++++
 1 file changed, 6 insertions(+)

Index: b/tests/regression/apparmor/onexec.sh
===================================================================
--- a/tests/regression/apparmor/onexec.sh
+++ b/tests/regression/apparmor/onexec.sh
@@ -103,6 +103,12 @@ do_test()
     # give the onexec process a chance to run
     sleep 0.05
 
+    # check that task hasn't exited because change_onexec failed
+    if ! [ -d "/proc/${_pid}" ] ; then
+       checktestfg
+       return
+    fi
+
     if ! check_current "${desc}" $_pid $prof ; then
        checktestfg
        return


-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to