mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Merge Error out on conflicting aa-exec parameters
If multiple -p/--profile or -n/--namespace parameters are given to aa-exec, they are handled on a "last one wins" base. This probably isn't expected behaviour, and erroring out in case of conflicting parameters probably makes more sense. PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/540 Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -131,9 +131,13 @@ static char **parse_args(int argc, char **argv)
|
||||
usage(argv[0], false);
|
||||
break;
|
||||
case 'p':
|
||||
if (opt_profile)
|
||||
error("Multiple -p/--profile parameters given");
|
||||
opt_profile = optarg;
|
||||
break;
|
||||
case 'n':
|
||||
if (opt_namespace)
|
||||
error("Multiple -n/--namespace parameters given");
|
||||
opt_namespace = optarg;
|
||||
break;
|
||||
case 'i':
|
||||
|
Reference in New Issue
Block a user