[PATCH] fix SHELL being set to the usr's home directory

From: Jakob Kramer <jakob.kramer_AT_gmx.de>
Date: Fri, 18 Oct 2013 21:57:24 +0200

---
 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
_AT_@ -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);
-- 
1.8.1.2
--------------090706020801040509080806--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 18 2013 - 22:12:06 CEST