From ca9fbc0d8edc12d0d885a465ffb085941cc9d157 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 31 Dec 2007 20:15:15 +0000 Subject: [PATCH] Compilation fix. pamh needs to be global since the split of check_perms(). --- src/chsh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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