diff options
| author | Ron Yorston <rmy@pobox.com> | 2024-08-08 08:31:09 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2024-08-08 08:31:09 +0100 |
| commit | c7f8fcfb3e26067019de01fdeeffd1ab556f73b9 (patch) | |
| tree | 4d89a78f5c0380695b8b95136f77903e92579154 /miscutils | |
| parent | e4a79dee4062157bc209f60895263d6dd85b6d9f (diff) | |
| download | busybox-w32-c7f8fcfb3e26067019de01fdeeffd1ab556f73b9.tar.gz busybox-w32-c7f8fcfb3e26067019de01fdeeffd1ab556f73b9.tar.bz2 busybox-w32-c7f8fcfb3e26067019de01fdeeffd1ab556f73b9.zip | |
drop: use correct option when cmd.exe is used as shell
Use the '/c' option to pass a command to cmd.exe. This is similar
to what was previously done for 'su': commit e5244175b (su: use
correct option when cmd.exe is used as shell).
Adds 48-64 bytes.
(GitHub issue #438)
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/drop.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/miscutils/drop.c b/miscutils/drop.c index a1344ab65..bef1fa52b 100644 --- a/miscutils/drop.c +++ b/miscutils/drop.c | |||
| @@ -140,6 +140,8 @@ int drop_main(int argc UNUSED_PARAM, char **argv) | |||
| 140 | case 'd': | 140 | case 'd': |
| 141 | if (opt_shell) { | 141 | if (opt_shell) { |
| 142 | arg = bb_basename(opt_shell); | 142 | arg = bb_basename(opt_shell); |
| 143 | if (strcasecmp(arg, "cmd.exe") == 0) | ||
| 144 | opt = "/c"; | ||
| 143 | exe = file_is_win32_exe(opt_shell); | 145 | exe = file_is_win32_exe(opt_shell); |
| 144 | } else { | 146 | } else { |
| 145 | arg = "sh"; | 147 | arg = "sh"; |
