(and rlogind knows more)
SCCS-vsn: usr.bin/login/login.c 5.61
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)login.c 5.60 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c 5.61 (Berkeley) %G%";
if (pwd && (*pwd->pw_passwd == '\0' ||
fflag && (uid == 0 || uid == pwd->pw_uid)))
break;
if (pwd && (*pwd->pw_passwd == '\0' ||
fflag && (uid == 0 || uid == pwd->pw_uid)))
break;
/*
* If trying to log in as root, but with insecure terminal,
/*
* If trying to log in as root, but with insecure terminal,
if (tty[sizeof("tty")-1] == 'd')
syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
if (tty[sizeof("tty")-1] == 'd')
syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
+ /* if fflag is on, assume caller/authenticator has logged root login */
+ if (pwd->pw_uid == 0 && fflag == 0)
if (hostname)
syslog(LOG_NOTICE, "ROOT LOGIN ON %s FROM %s",
tty, hostname);
if (hostname)
syslog(LOG_NOTICE, "ROOT LOGIN ON %s FROM %s",
tty, hostname);