]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Compile fixes & cleanups.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:26:52 +0000 (18:26 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:26:52 +0000 (18:26 +0000)
src/su.c

index fc473c6c0ebe23a4b045ae9e544e9b917f1165a1..2ee942a7001016af399a0242e281345b8e14f2df 100644 (file)
--- 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, "");