mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: exit with error on invalid arguments
The parser currently indicates that it exited successfully if invalid arguments are passed to it, which makes it difficult to detect when other tools are calling it incorrectly. This patch causes it to return '1' indicating a failure. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -572,7 +572,7 @@ static int process_arg(int c, char *optarg)
|
||||
break;
|
||||
default:
|
||||
display_usage(progname);
|
||||
exit(0);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user