diff options
author | Ron Yorston <rmy@pobox.com> | 2023-08-30 13:07:13 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-08-30 13:07:13 +0100 |
commit | 2af141a2c069c56d56f110414f600f3a38ad8617 (patch) | |
tree | 0709c2d3ec4babe557a6fdcbe5334d3665bea0a4 /libbb | |
parent | 89e67c6f7a77e0e16cbf394f18d4cb121e37f544 (diff) | |
download | busybox-w32-2af141a2c069c56d56f110414f600f3a38ad8617.tar.gz busybox-w32-2af141a2c069c56d56f110414f600f3a38ad8617.tar.bz2 busybox-w32-2af141a2c069c56d56f110414f600f3a38ad8617.zip |
ash: changes to login shell functionality
Upstream BusyBox supports the usual Unix functionality where the
login process adds a '-' prefix to the shell's argv[0]. Since
busybox-w32 doesn't have a login process this serves no purpose
and can be removed.
Instead it would be useful to have a way to invoke a login shell
without requiring any arguments. Advantages would be:
- easier to configure busybox-w32 'ash' as the SSH login shell;
- double clicking on a shell binary could start a login shell.
Add 'lash' as an alias for 'ash' which starts a login shell without
requiring the '-l' option.
Saves 16 bytes.
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/appletlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index bf9ae4603..6b610743a 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -1379,9 +1379,10 @@ int main(int argc UNUSED_PARAM, char **argv) | |||
1379 | argv++; | 1379 | argv++; |
1380 | # endif | 1380 | # endif |
1381 | applet_name = argv[0]; | 1381 | applet_name = argv[0]; |
1382 | # if !ENABLE_PLATFORM_MINGW32 | ||
1382 | if (applet_name[0] == '-') | 1383 | if (applet_name[0] == '-') |
1383 | applet_name++; | 1384 | applet_name++; |
1384 | # if ENABLE_PLATFORM_MINGW32 | 1385 | # else |
1385 | str_tolower(argv[0]); | 1386 | str_tolower(argv[0]); |
1386 | bs_to_slash(argv[0]); | 1387 | bs_to_slash(argv[0]); |
1387 | if (has_exe_suffix_or_dot(argv[0])) { | 1388 | if (has_exe_suffix_or_dot(argv[0])) { |