[Pkg-shadow-devel] Bug#479406: su fails for users with a POSIX script as their login shell
Nicolas François
nicolas.francois at centraliens.net
Mon Jul 20 14:03:35 UTC 2009
tags 479406 pending
thanks
Hi,
On Sun, Jul 19, 2009 at 08:58:49PM +0100, stephane_chazelas at yahoo.fr wrote:
> 2009-07-18 21:26:56 +0200, Nicolas François:
> > Ping
>
> Sorry, forgot to reply to your earlier email.
No problem (it took me a year for the previous answer ;)
> > > Are there other su / login implementations which behave that way?
> [...]
>
> AFAICS, the "login" from util-linux (derived from BSD) and the
> one from NetBSD and OpenBSD at least do use the exec?p variants
> (from a quick look at there source code).
>
> The OpenSolaris one seems to be checking for that case (pw_shell
> being a shell script) explicitely and treats it specially:
>
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/login/login.c#2507
login is the easiest, su is more complex because the behavior of
"su -c <command>" must be defined in this case. So I will just make it as
"/bin/sh <shell> -c <command>"
I will commit and test the attached patch, which should fix it for both
login and su.
Best Regards,
--
Nekral
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shadow.diff
Type: text/x-diff
Size: 2317 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20090720/e67e69a3/attachment.diff>
More information about the Pkg-shadow-devel
mailing list