log a detailed error (not usage()) when there are extra non-option arguments

Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Laine Stump 2023-02-15 03:24:36 -05:00 committed by Stefano Brivio
parent 60bd93e91f
commit a1ab1ca2ee

2
conf.c
View file

@ -1536,7 +1536,7 @@ void conf(struct ctx *c, int argc, char **argv)
if (c->mode == MODE_PASTA) if (c->mode == MODE_PASTA)
conf_pasta_ns(&netns_only, userns, netns, optind, argc, argv); conf_pasta_ns(&netns_only, userns, netns, optind, argc, argv);
else if (optind != argc) else if (optind != argc)
usage(argv[0]); die("Extra non-option argument: %s", argv[optind]);
isolate_user(uid, gid, !netns_only, userns, c->mode); isolate_user(uid, gid, !netns_only, userns, c->mode);