Subject: Re: CVS commit: src/usr.bin/su
To: None <source-changes@netbsd.org>
From: Jason R. Fink <jrf@adresearch.com>
List: source-changes
Date: 06/19/2003 13:33:48
> So are you going to mention it now? :-)

Under certain conditions, an su -m will fail. Specifically
when the user is root and the passwd db is in 
Hesiod or NIS, and root's shell is /bin/sh.

getpwnam() calls getusershell() and looks at /etc/shells. 
The pointer remains at the second entry of /etc/shells if
/bin/sh is first and root is using it (I would assume the
same would happen for any).

Fix, call setusershell() to rewind right before 
looping with getusershell().