The server will now do a shutdown() on its socket in order to test the
AppArmor 'shutdown' unix rule permission.

Signed-off-by: Tyler Hicks <[email protected]>
---
 tests/regression/apparmor/unix_socket.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/regression/apparmor/unix_socket.c 
b/tests/regression/apparmor/unix_socket.c
index 34d1b9e..1b89c45 100644
--- a/tests/regression/apparmor/unix_socket.c
+++ b/tests/regression/apparmor/unix_socket.c
@@ -217,6 +217,12 @@ int main (int argc, char *argv[])
                exit(1);
        }
 
+       rc = shutdown(sock, SHUT_RDWR);
+       if (rc == -1) {
+               perror("FAIL - shutdown");
+               exit(1);
+       }
+
        printf("PASS\n");
        exit(0);
 }
-- 
2.1.0


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

Reply via email to