[apparmor] [PATCH] fix missing long opt arg value

Kees Cook kees at ubuntu.com
Wed Jun 26 18:05:43 UTC 2013


Using --subdomainfs without an argument triggers a segfault. This was due
to the long option missing the "has_arg" flag.

Signed-off-by: Kees Cook <kees at ubuntu.com>


=== modified file 'parser/parser_main.c'
--- parser/parser_main.c        2013-05-02 18:32:56 +0000
+++ parser/parser_main.c        2013-06-26 18:04:16 +0000
@@ -91,7 +91,7 @@
        {"add",                 0, 0, 'a'},
        {"binary",              0, 0, 'B'},
        {"base",                1, 0, 'b'},
-       {"subdomainfs",         0, 0, 'f'},
+       {"subdomainfs",         1, 0, 'f'},
        {"help",                2, 0, 'h'},
        {"replace",             0, 0, 'r'},
        {"reload",              0, 0, 'r'},     /* undocumented reload
option == replace */


-- 
Kees Cook



More information about the AppArmor mailing list