From ab373918376f5d9c57d79eabd8a87dc4277bba83 Mon Sep 17 00:00:00 2001 From: Jakob Kramer Date: Fri, 18 Oct 2013 21:57:24 +0200 Subject: [PATCH] fix SHELL being set to the usr's home directory --- su.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/su.c b/su.c index 94ead18..339cba1 100644 --- a/su.c +++ b/su.c @@ -106,7 +106,7 @@ main(int argc, char **argv) newargv = (char *const[]){pw->pw_shell, NULL}; if (!pflag) { setenv("HOME", pw->pw_dir, 1); - setenv("SHELL", pw->pw_dir, 1); + setenv("SHELL", pw->pw_shell, 1); if (strcmp(pw->pw_name, "root") != 0) { setenv("USER", pw->pw_name, 1); setenv("LOGNAME", pw->pw_name, 1);