change setlogname --> setlogin
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Sat, 3 Feb 1990 13:40:39 +0000 (05:40 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Sat, 3 Feb 1990 13:40:39 +0000 (05:40 -0800)
SCCS-vsn: usr.bin/login/login.c 5.49

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

index 85f77c0..1af1b70 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)login.c    5.48 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c    5.49 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -471,8 +471,8 @@ main(argc, argv)
        strcpy(tbuf + 1, (p = rindex(pwd->pw_shell, '/')) ?
            p + 1 : pwd->pw_shell);
 
        strcpy(tbuf + 1, (p = rindex(pwd->pw_shell, '/')) ?
            p + 1 : pwd->pw_shell);
 
-       if (setlogname(pwd->pw_name, strlen(pwd->pw_name)) < 0)
-               syslog(LOG_ERR, "setlogname() failure: %m");
+       if (setlogin(pwd->pw_name) < 0)
+               syslog(LOG_ERR, "setlogin() failure: %m");
 
        /* discard permissions last so can't get killed and drop core */
        (void)setuid(pwd->pw_uid);
 
        /* discard permissions last so can't get killed and drop core */
        (void)setuid(pwd->pw_uid);