summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-12 13:57:46 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-14 16:17:01 -0800
commitf533861f868afc167aae06968db5bc138729189f (patch)
treeeff8b5e0ce0b88c2ab470a1bfd841668f26a005d /shell.c
parentfc7695ee76400ee9833301f98a3fe483d64591b5 (diff)
downloadvyatta-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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/shell.c b/shell.c
index 6d07c78..b8dcf32 100644
--- a/shell.c
+++ b/shell.c
@@ -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++;
}