From 40a16a1b040779e0793fdf0797b1cb19b5b4c0a2 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 13 Jun 2011 18:26:52 +0000 Subject: [PATCH] Compile fixes & cleanups. --- src/su.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/su.c b/src/su.c index fc473c6c0..2ee942a70 100644 --- a/src/su.c +++ b/src/su.c @@ -317,8 +317,8 @@ static void run_shell (const char *shellstr, char *args[], bool doshell, || (sigaddset (&ourset, SIGQUIT) != 0) || (sigaddset (&ourset, SIGTSTP) != 0) || (sigaction (SIGINT, &action, NULL) != 0) - || (sigaction (SIGQUIT, &action, NULL) != 0)) - || (sigaction (SIGTSTP, &action, NULL) != 0)) + || (sigaction (SIGQUIT, &action, NULL) != 0) + || (sigaction (SIGTSTP, &action, NULL) != 0))) || (sigprocmask (SIG_UNBLOCK, &ourset, NULL) != 0) ) { fprintf (stderr, @@ -421,6 +421,14 @@ static void usage (int status) */ static struct passwd * check_perms (void) { +#ifdef USE_PAM + int ret; +#else /* !USE_PAM */ +#ifdef SU_ACCESS + struct spwd *spwd = NULL; +#endif /* SU_ACCESS */ + RETSIGTYPE (*oldsig) (int); +#endif /* !USE_PAM */ /* * The password file entries for the user is gotten and the account * validated. @@ -691,9 +699,6 @@ int main (int argc, char **argv) int ret; #else /* !USE_PAM */ int err = 0; - - RETSIGTYPE (*oldsig) (int); - #endif /* !USE_PAM */ (void) setlocale (LC_ALL, ""); -- 2.47.3