diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-12 13:57:46 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-14 16:17:01 -0800 |
commit | f533861f868afc167aae06968db5bc138729189f (patch) | |
tree | eff8b5e0ce0b88c2ab470a1bfd841668f26a005d /shell.c | |
parent | fc7695ee76400ee9833301f98a3fe483d64591b5 (diff) | |
download | vyatta-bash-f533861f868afc167aae06968db5bc138729189f.tar.gz vyatta-bash-f533861f868afc167aae06968db5bc138729189f.zip |
patched with "debian_patches" in bash_3.1dfsg-8.diff.gz
Diffstat (limited to 'shell.c')
-rw-r--r-- | shell.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -460,7 +460,7 @@ main (argc, argv, env) if (dump_translatable_strings) read_but_dont_execute = 1; - if (running_setuid && privileged_mode == 0) + if (running_setuid && privileged_mode == 0 && act_like_sh == 0) disable_priv_mode (); /* Need to get the argument to a -c option processed in the @@ -1533,9 +1533,10 @@ set_shell_name (argv0) any startup files; just try to be more like /bin/sh. */ shell_name = argv0 ? base_pathname (argv0) : PROGRAM; - if (*shell_name == '-') + if (argv0 && *argv0 == '-') { - shell_name++; + if (*shell_name == '-') + shell_name++; login_shell++; } |