From: nekral-guest Date: Mon, 31 Dec 2007 15:07:59 +0000 (+0000) Subject: sflg needs to be global. X-Git-Tag: 4.1.1~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a67b445b1d900f1776ea26a5d625ffb0c36a31c;p=shadow sflg needs to be global. --- diff --git a/src/chsh.c b/src/chsh.c index 3da44b68..f6c3f624 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -63,6 +63,8 @@ static char *Prog; /* Program name */ 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 */ /* external identifiers */ @@ -417,7 +419,6 @@ static void update_shell (const char *user, char *loginsh) int main (int argc, char **argv) { char *user; /* User name */ - int sflg = 0; /* -s - set shell from command line */ const struct passwd *pw; /* Password entry from /etc/passwd */ sanitize_env ();