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>
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;
addenv ("XAUTHORITY", cp);
}
} else {
+ char **envp = environ;
while (NULL != *envp) {
addenv (*envp, NULL);
envp++;
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);