]> granicus.if.org Git - shadow/commitdiff
sflg needs to be global.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 31 Dec 2007 15:07:59 +0000 (15:07 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 31 Dec 2007 15:07:59 +0000 (15:07 +0000)
src/chsh.c

index 3da44b6880fdbc345f64720cd21ca19ab9820593..f6c3f6241aa26aa2cb4327057284c549b6e527e8 100644 (file)
@@ -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 ();