* src/su.c: Too much const were added on 2011-08-15. pw in

save_caller_context() is allocated and freed.
	* src/su.c: Added missing #endif indication
	* src/su.c save_caller_context(): password only needed if
	SU_ACCESS and !USE_PAM.
This commit is contained in:
nekral-guest
2011-09-18 17:47:03 +00:00
parent 603d949ed5
commit 6f05b866bc
2 changed files with 15 additions and 3 deletions

View File

@@ -654,8 +654,12 @@ static /*@only@*/struct passwd * check_perms (void)
*/
static void save_caller_context (char **argv)
{
const struct passwd *pw = NULL;
struct passwd *pw = NULL;
#ifndef USE_PAM
#ifdef SU_ACCESS
const char *password = NULL;
#endif /* SU_ACCESS */
#endif /* !USE_PAM */
/*
* Get the program name. The program name is used as a prefix to
* most error messages.
@@ -673,7 +677,7 @@ static void save_caller_context (char **argv)
if ((isatty (0) != 0) && (NULL != caller_tty)) {
#ifndef USE_PAM
caller_on_console = console (caller_tty);
#endif
#endif /* !USE_PAM */
} else {
/*
* Be more paranoid, like su from SimplePAMApps. --marekm