ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit bfb4b38cffed5cebe1617386befae7a5980df87c
parent acb9ae197e8e71c94c8fa16bc315930d9cbc6dcd
Author: sin <sin@2f30.org>
Date:   Fri, 18 Oct 2013 16:22:24 +0100

If we are preserving the environment use SHELL instead of pw->pw_shell

Diffstat:
Msu.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/su.c b/su.c @@ -112,7 +112,8 @@ main(int argc, char **argv) setenv("LOGNAME", pw->pw_name, 1); } } - execve(pw->pw_shell, newargv, environ); + execve(pflag ? getenv("SHELL") : pw->pw_shell, + newargv, environ); } return (errno == ENOENT) ? 127 : 126; }