* src/su.c: Cleanup local variables.

This commit is contained in:
nekral-guest 2011-06-13 18:26:36 +00:00
parent b273c4d19f
commit b661b913b5
2 changed files with 3 additions and 3 deletions

View File

@ -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@centraliens.net>

View File

@ -602,12 +602,10 @@ int main (int argc, char **argv)
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 @@ int main (int argc, char **argv)
addenv ("XAUTHORITY", cp);
}
} else {
char **envp = environ;
while (NULL != *envp) {
addenv (*envp, NULL);
envp++;
@ -959,7 +958,7 @@ int main (int argc, char **argv)
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);