]> granicus.if.org Git - shadow/commitdiff
Compilation fix. pamh needs to be global since the split of check_perms().
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 31 Dec 2007 20:15:15 +0000 (20:15 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 31 Dec 2007 20:15:15 +0000 (20:15 +0000)
src/chsh.c

index d97cb603038fd55ea717e0c97e523256a651e30c..6e1e5eda3a8c56471e764c972a2d3d9ac45b9025 100644 (file)
@@ -65,6 +65,9 @@ static int amroot;            /* Real UID is root */
 static char loginsh[BUFSIZ];   /* Name of new login shell */
 /* command line options */
 static int sflg = 0;           /* -s - set shell from command line  */
+#ifdef USE_PAM
+static pam_handle_t *pamh = NULL;
+#endif
 
 /* external identifiers */
 
@@ -231,7 +234,6 @@ static void process_flags (int argc, char **argv)
 static void check_perms (const struct passwd *pw)
 {
 #ifdef USE_PAM
-       pam_handle_t *pamh = NULL;
        int retval;
        struct passwd *pampw;
 #endif