for marc; hushlogin for password expiration and Kerberos messages
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 15 Mar 1989 00:40:25 +0000 (16:40 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 15 Mar 1989 00:40:25 +0000 (16:40 -0800)
SCCS-vsn: usr.bin/login/login.c 5.37

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

index 33baab4..80ac767 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)login.c    5.36 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c    5.37 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -318,7 +318,7 @@ main(argc, argv)
                        printf("Sorry -- your password has expired.\n");
                        sleepexit(1);
                }
                        printf("Sorry -- your password has expired.\n");
                        sleepexit(1);
                }
-               else if (tp.tv_sec - pwd->pw_change < TWOWEEKS) {
+               else if (tp.tv_sec - pwd->pw_change < TWOWEEKS && !quietlog) {
                        ttp = localtime(&pwd->pw_change);
                        printf("Warning: your password expires on %s %d, 19%d\n",
                            months[ttp->tm_mon], ttp->tm_mday, ttp->tm_year);
                        ttp = localtime(&pwd->pw_change);
                        printf("Warning: your password expires on %s %d, 19%d\n",
                            months[ttp->tm_mon], ttp->tm_mday, ttp->tm_year);
@@ -328,7 +328,7 @@ main(argc, argv)
                        printf("Sorry -- your account has expired.\n");
                        sleepexit(1);
                }
                        printf("Sorry -- your account has expired.\n");
                        sleepexit(1);
                }
-               else if (tp.tv_sec - pwd->pw_expire < TWOWEEKS) {
+               else if (tp.tv_sec - pwd->pw_expire < TWOWEEKS && !quietlog) {
                        ttp = localtime(&pwd->pw_expire);
                        printf("Warning: your account expires on %s %d, 19%d\n",
                            months[ttp->tm_mon], ttp->tm_mday, ttp->tm_year);
                        ttp = localtime(&pwd->pw_expire);
                        printf("Warning: your account expires on %s %d, 19%d\n",
                            months[ttp->tm_mon], ttp->tm_mday, ttp->tm_year);
@@ -347,7 +347,6 @@ main(argc, argv)
                login(&utmp);
        }
 
                login(&utmp);
        }
 
-       quietlog = access(_PATH_HUSHLOGIN, F_OK) == 0;
        dolastlog(quietlog);
 
        if (!hflag) {                                   /* XXX */
        dolastlog(quietlog);
 
        if (!hflag) {                                   /* XXX */