From c7f8fcfb3e26067019de01fdeeffd1ab556f73b9 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 8 Aug 2024 08:31:09 +0100 Subject: 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) --- miscutils/drop.c | 2 ++ 1 file changed, 2 insertions(+) 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) case 'd': if (opt_shell) { arg = bb_basename(opt_shell); + if (strcasecmp(arg, "cmd.exe") == 0) + opt = "/c"; exe = file_is_win32_exe(opt_shell); } else { arg = "sh"; -- cgit v1.2.3-55-g6feb