diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-04-07 10:55:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-07 10:55:30 +0200 |
commit | ddd43f31e3be45a276ec4191eace333f844b98b8 (patch) | |
tree | b92573d9b4beb6a6e3f049993f27349273110e40 /src/nspawn | |
parent | 9c1d3d6fa7f00673c0f650139cf5e9a3d4f37827 (diff) | |
parent | 6339d3e6021f31a8a8907c2613f1aaac279fe745 (diff) | |
download | systemd-ddd43f31e3be45a276ec4191eace333f844b98b8.tar.gz |
Merge pull request #26887 from yuwata/proc-cmdline-filter-arguments
proc-cmdline: filter PID1 arguments on container
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 8abb016791..ce95b10b1c 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -815,6 +815,9 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); + /* Resetting to 0 forces the invocation of an internal initialization routine of getopt_long() + * that checks for GNU extensions in optstring ('-' or '+' at the beginning). */ + optind = 0; while ((c = getopt_long(argc, argv, "+hD:u:abL:M:jS:Z:qi:xp:nUE:P", options, NULL)) >= 0) switch (c) { |