From: nekral-guest Date: Mon, 13 Jun 2011 18:26:52 +0000 (+0000) Subject: Compile fixes & cleanups. X-Git-Tag: 4.1.5~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40a16a1b040779e0793fdf0797b1cb19b5b4c0a2;p=thirdparty%2Fshadow.git Compile fixes & cleanups. --- 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, "");