move openlog before syslog call
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 1 Jun 1990 05:17:35 +0000 (21:17 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 1 Jun 1990 05:17:35 +0000 (21:17 -0800)
SCCS-vsn: usr.bin/login/login.c 5.55

usr/src/usr.bin/login/login.c

index 73a0b82..5c72828 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)login.c    5.54 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c    5.55 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -108,6 +108,8 @@ main(argc, argv)
        (void)signal(SIGINT, SIG_IGN);
        (void)setpriority(PRIO_PROCESS, 0, 0);
 
        (void)signal(SIGINT, SIG_IGN);
        (void)setpriority(PRIO_PROCESS, 0, 0);
 
+       openlog("login", LOG_ODELAY, LOG_AUTH);
+
        /*
         * -p is used by getty to tell login not to destroy the environment
         * -r is used by rlogind to cause the autologin protocol;
        /*
         * -p is used by getty to tell login not to destroy the environment
         * -r is used by rlogind to cause the autologin protocol;
@@ -121,8 +123,6 @@ main(argc, argv)
        else
                domain = index(localhost, '.');
 
        else
                domain = index(localhost, '.');
 
-       openlog("login", LOG_ODELAY, LOG_AUTH);
-
        fflag = hflag = pflag = rflag = 0;
        passwd_req = 1;
        uid = getuid();
        fflag = hflag = pflag = rflag = 0;
        passwd_req = 1;
        uid = getuid();