diff --git a/tests/regression/apparmor/attach_disconnected.sh b/tests/regression/apparmor/attach_disconnected.sh index 74a1a213c..405331b13 100644 --- a/tests/regression/apparmor/attach_disconnected.sh +++ b/tests/regression/apparmor/attach_disconnected.sh @@ -30,6 +30,8 @@ att_dis_client=$pwd/attach_disconnected . "$bin/mount.inc" +requires_kernel_features network/af_unix + attach_disconnected_cleanup() { if [ ! -z "$loop_device" ]; then losetup -d $loop_device diff --git a/tests/regression/apparmor/deleted.sh b/tests/regression/apparmor/deleted.sh index cef2c3950..88aa640d7 100755 --- a/tests/regression/apparmor/deleted.sh +++ b/tests/regression/apparmor/deleted.sh @@ -87,6 +87,8 @@ EOM # lets just be on the safe side rm -f ${socket} +# these tests require af_unix support +if [ "$(kernel_features network/af_unix)" = "true" -a "$(parser_supports 'unix,')" = "true" ]; then # PASS - unconfined client genprofile $af_unix $file:$okperm $socket:rw $fd_client:ux @@ -130,3 +132,6 @@ runchecktest "fd passing; confined client w/ w only" fail $file $fd_client $sock sleep 1 rm -f ${socket} +else + echo " Required feature 'network/af_unix' not available. Skipping subset of tests that require network/af_unix ..." +fi diff --git a/tests/regression/apparmor/unix_fd_server.sh b/tests/regression/apparmor/unix_fd_server.sh index 92624f3fe..444e7375f 100755 --- a/tests/regression/apparmor/unix_fd_server.sh +++ b/tests/regression/apparmor/unix_fd_server.sh @@ -27,10 +27,12 @@ okperm=rw badperm=w af_unix="" -if [ "$(kernel_features network_v8)" = "true" -a "$(parser_supports 'unix,')" = "true" ]; then - af_unix="unix:create" -elif [ "$(kernel_features network/af_unix)" = "true" -a "$(parser_supports 'unix,')" = "true" ]; then +if [ "$(kernel_features network/af_unix)" = "true" -a "$(parser_supports 'unix,')" = "true" ]; then af_unix="unix:create" +elif [ "$(kernel_features network_v8)" = "true" -a "$(parser_supports 'unix,')" = "true" ]; then + # actual set needed close to just full + # af_unix="unix," + af_unix="unix:(create,bind,listen,accept,connect,rw)" fi # Content generated with: diff --git a/tests/regression/apparmor/unix_socket_pathname.sh b/tests/regression/apparmor/unix_socket_pathname.sh index 379786d4a..40c94c5fa 100755 --- a/tests/regression/apparmor/unix_socket_pathname.sh +++ b/tests/regression/apparmor/unix_socket_pathname.sh @@ -60,10 +60,10 @@ if ( [ "$(kernel_features network_v8/af_unix)" = "true" ] || af_unix_okserver="create,setopt" af_unix_okclient="create,getopt,setopt,getattr" elif [ "$(kernel_features network_v8)" = "true" ] ; then -# af_unix_okserver="create,setopt" -# af_unix_okclient="create,getopt,setopt,getattr" - af_unix_okserver="create" - af_unix_okclient="create" + af_unix_okserver="create,setopt" + af_unix_okclient="create,getopt,setopt,getattr" + # af_unix_okserver="create" + # af_unix_okclient="create" fi okclient=rw