Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc-3
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
-g -O2
uname output: Linux alan 2.4.27 #2 Thu Sep 2 09:23:09 BST 2004 i686 unknown
unknown GNU/Linux
Machine Type: i686-unknown-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
Trying to set up a user who logs into a restricted shell. Set
shell field in /etc/passwd to /usr/rbin/rbash, add filename to
/etc/shells, copy bash to /usr/rbin/rbash.
User logs in over ssh, but is not in a restricted shell.
This is because in a login shell, the shell is "-rbash", with
a leading minus.
Fix:
In shell.c, base_pathname is called to get the name of the
shell. The name should then be checked for the presence of a
leading "-", before comparing against "rbash".
example patch: