Commit 64f70cc755 (Add --login support) added code in options() to handle the bash-compatible '--login' option. In doing so it committed BusyBox ash to silently accepting all other long options.
Restore compatibility with other ash variants by rejecting unknown long options. Signed-off-by: Ron Yorston <[email protected]> --- shell/ash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/ash.c b/shell/ash.c index bbd730770..0a145d31b 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -11502,11 +11502,11 @@ options(int *login_sh) if (val && (c == '-')) { /* long options */ if (strcmp(p, "login") == 0) { *login_sh = 1; + break; } /* TODO: --noprofile: e.g. if I want to run emergency shell from sulogin, * I want minimal/no shell init scripts - but it insists on running it as "-ash"... */ - break; } } if (c == 'o') { -- 2.46.1 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
