From: nekral-guest Date: Mon, 31 Dec 2007 20:15:15 +0000 (+0000) Subject: Compilation fix. pamh needs to be global since the split of check_perms(). X-Git-Tag: 4.1.1~194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca9fbc0d8edc12d0d885a465ffb085941cc9d157;p=shadow Compilation fix. pamh needs to be global since the split of check_perms(). --- diff --git a/src/chsh.c b/src/chsh.c index d97cb603..6e1e5eda 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -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