diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-12 08:44:32 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-12 08:44:32 +0100 |
| commit | ef2366cdca45941f943f4970ac57a4008181fca9 (patch) | |
| tree | 02f1626637bd34697b2b380e80a0aebc78996f84 | |
| parent | 030fe31760169783537162b83af89e551bf120f6 (diff) | |
| download | busybox-w32-ef2366cdca45941f943f4970ac57a4008181fca9.tar.gz busybox-w32-ef2366cdca45941f943f4970ac57a4008181fca9.tar.bz2 busybox-w32-ef2366cdca45941f943f4970ac57a4008181fca9.zip | |
nsenter: stop option parsing on 1st non-option
"nsenter ls -l" gives: invalid option -- 'l'
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | findutils/find.c | 2 | ||||
| -rw-r--r-- | util-linux/nsenter.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/findutils/find.c b/findutils/find.c index a8c3fa346..34e11ae26 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
| @@ -1522,7 +1522,7 @@ int find_main(int argc UNUSED_PARAM, char **argv) | |||
| 1522 | } | 1522 | } |
| 1523 | *past_HLP = NULL; | 1523 | *past_HLP = NULL; |
| 1524 | /* "+": stop on first non-option */ | 1524 | /* "+": stop on first non-option */ |
| 1525 | i = getopt32(argv, "+HLP"); | 1525 | i = getopt32(argv, "+""HLP"); |
| 1526 | if (i & (1<<0)) | 1526 | if (i & (1<<0)) |
| 1527 | G.recurse_flags |= ACTION_FOLLOWLINKS_L0 | ACTION_DANGLING_OK; | 1527 | G.recurse_flags |= ACTION_FOLLOWLINKS_L0 | ACTION_DANGLING_OK; |
| 1528 | if (i & (1<<1)) | 1528 | if (i & (1<<1)) |
diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c index c48dcf885..9cfbf21e4 100644 --- a/util-linux/nsenter.c +++ b/util-linux/nsenter.c | |||
| @@ -103,8 +103,9 @@ static const struct namespace_descr ns_list[] = { | |||
| 103 | }; | 103 | }; |
| 104 | /* | 104 | /* |
| 105 | * Upstream nsenter doesn't support the short option for --preserve-credentials | 105 | * Upstream nsenter doesn't support the short option for --preserve-credentials |
| 106 | * "+": stop on first non-option | ||
| 106 | */ | 107 | */ |
| 107 | static const char opt_str[] ALIGN1 = "U::i::u::n::p::m::""t:+S:+G:+r::w::F"; | 108 | static const char opt_str[] ALIGN1 = "+""U::i::u::n::p::m::""t:+S:+G:+r::w::F"; |
| 108 | 109 | ||
| 109 | #if ENABLE_LONG_OPTS | 110 | #if ENABLE_LONG_OPTS |
| 110 | static const char nsenter_longopts[] ALIGN1 = | 111 | static const char nsenter_longopts[] ALIGN1 = |
