[Pkg-shadow-commits] r3348 - in upstream/trunk: . src

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Mon Jun 13 18:26:37 UTC 2011


Author: nekral-guest
Date: 2011-06-13 18:26:36 +0000 (Mon, 13 Jun 2011)
New Revision: 3348

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/su.c
Log:
	* src/su.c: Cleanup local variables.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-06-13 18:26:31 UTC (rev 3347)
+++ upstream/trunk/ChangeLog	2011-06-13 18:26:36 UTC (rev 3348)
@@ -25,6 +25,7 @@
 	authenticated user. Remove usage of the pwent variable.
 	* src/su.c: The password of the caller is the one from the
 	spwd structure only if the passwd's password is 'x'.
+	* src/su.c: Cleanup local variables.
 
 2011-06-10  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c	2011-06-13 18:26:31 UTC (rev 3347)
+++ upstream/trunk/src/su.c	2011-06-13 18:26:36 UTC (rev 3348)
@@ -602,12 +602,10 @@
 	bool amroot = false;
 	uid_t my_uid;
 	struct passwd *pw = NULL;
-	char **envp = environ;
 	char *shellstr = NULL;
 	char *command = NULL;
 
 #ifdef USE_PAM
-	char **envcp;
 	int ret;
 #else				/* !USE_PAM */
 	int err = 0;
@@ -892,6 +890,7 @@
 			addenv ("XAUTHORITY", cp);
 		}
 	} else {
+		char **envp = environ;
 		while (NULL != *envp) {
 			addenv (*envp, NULL);
 			envp++;
@@ -959,7 +958,7 @@
 
 	if (change_environment) {
 		/* update environment with all pam set variables */
-		envcp = pam_getenvlist (pamh);
+		char **envcp = pam_getenvlist (pamh);
 		if (NULL != envcp) {
 			while (NULL != *envcp) {
 				addenv (*envcp, NULL);




More information about the Pkg-shadow-commits mailing list