]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
login: move timeout from global to local scope
authorSami Kerola <kerolasa@iki.fi>
Thu, 12 Nov 2020 23:58:59 +0000 (23:58 +0000)
committerSami Kerola <kerolasa@iki.fi>
Thu, 3 Dec 2020 20:06:47 +0000 (20:06 +0000)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/login.c

index 0bf64f42cb34be359b202bcde30e9846e64331c5..b15b0ee18e4ed04cb734ac750915d37f70fd0eec 100644 (file)
@@ -151,7 +151,6 @@ struct login_context {
  * This bounds the time given to login.  Not a define, so it can
  * be patched on machines where it's too small.
  */
-static unsigned int timeout = LOGIN_TIMEOUT;
 static int child_pid = 0;
 static volatile sig_atomic_t got_sig = 0;
 static char *timeout_msg;
@@ -1260,6 +1259,7 @@ int main(int argc, char **argv)
        char *buff;
        int childArgc = 0;
        int retcode;
+       unsigned int timeout;
        struct sigaction act;
        struct passwd *pwd;
        static const int wanted_fds[] = {