diff options
author | David Greenman <dg@FreeBSD.org> | 1995-09-02 14:40:12 +0000 |
---|---|---|
committer | David Greenman <dg@FreeBSD.org> | 1995-09-02 14:40:12 +0000 |
commit | 6f926d27c07ef534cf160edcb0733f54dfdde0a3 (patch) | |
tree | 6745943ddf1fc1cecb19bffd4169920ff0d66b39 | |
parent | 5fcef1426d0dcb8db2ed7d03f50f1df24884e974 (diff) |
Notes
-rw-r--r-- | libexec/rexecd/rexecd.c | 3 | ||||
-rw-r--r-- | libexec/rshd/rshd.c | 5 | ||||
-rw-r--r-- | libexec/uucpd/uucpd.c | 2 | ||||
-rw-r--r-- | usr.sbin/cron/lib/entry.c | 7 | ||||
-rw-r--r-- | usr.sbin/pppd/auth.c | 5 |
5 files changed, 17 insertions, 5 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index 5fc36175c2966..9c6d029f751a6 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -188,7 +188,8 @@ doit(f, fromp) } } - if (pwd->pw_uid == 0 || *pwd->pw_passwd == '\0') { + if (pwd->pw_uid == 0 || *pwd->pw_passwd == '\0' || + (pwd->pw_expire && time(NULL) >= pwd->pw_expire)) { syslog(LOG_ERR, "%s LOGIN REFUSED from %s", user, remote); error("Login incorrect.\n"); exit(1); diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 1b9eea9e1e58b..77636015f340e 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -445,9 +445,10 @@ doit(fromp) #endif if (errorstr || - pwd->pw_passwd != 0 && *pwd->pw_passwd != '\0' && + (pwd->pw_expire && time(NULL) >= pwd->pw_expire) || + (pwd->pw_passwd != 0 && *pwd->pw_passwd != '\0' && iruserok(fromp->sin_addr.s_addr, pwd->pw_uid == 0, - remuser, locuser) < 0) { + remuser, locuser) < 0)) { if (__rcmd_errstr) syslog(LOG_INFO|LOG_AUTH, "%s@%s as %s: permission denied (%s). cmd='%.80s'", diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index 490e4c51d0cb8..f645eea75214f 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -159,6 +159,8 @@ void doit(struct sockaddr_in *sinp) login_incorrect(user, sinp); if (strcmp(pw->pw_shell, _PATH_UUCICO)) login_incorrect(user, sinp); + if (pw->pw_expire && time(NULL) >= pw->pw_expire) + login_incorrect(user, sinp); if (pw->pw_passwd && *pw->pw_passwd != '\0') { printf("Password: "); fflush(stdout); if (readline(passwd, sizeof passwd, 1) < 0) { diff --git a/usr.sbin/cron/lib/entry.c b/usr.sbin/cron/lib/entry.c index 13d1644c0ef05..58ecf4ee7fbc0 100644 --- a/usr.sbin/cron/lib/entry.c +++ b/usr.sbin/cron/lib/entry.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: entry.c,v 1.2 1995/04/12 19:04:26 ache Exp $"; +static char rcsid[] = "$Id: entry.c,v 1.4 1995/08/28 21:30:46 mpp Exp $"; #endif /* vix 26jan87 [RCS'd; rest of log is in RCS file] @@ -241,6 +241,11 @@ load_entry(file, error_func, pw, envp) Debug(DPARS, ("load_entry()...uid %d, gid %d\n",e->uid,e->gid)) } + if (pw->pw_expire && time(NULL) >= pw->pw_expire) { + ecode = e_username; + goto eof; + } + e->uid = pw->pw_uid; e->gid = pw->pw_gid; diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c index e8b2d06e15d68..97fd9c37398f0 100644 --- a/usr.sbin/pppd/auth.c +++ b/usr.sbin/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.2 1994/09/25 02:31:52 wollman Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.4 1995/08/28 21:30:51 mpp Exp $"; #endif #include <stdio.h> @@ -456,6 +456,9 @@ login(user, passwd, msg, msglen) return (UPAP_AUTHNAK); } + if (pw->pw_expire && time(NULL) >= pw->pw_expire) + return (UPAP_AUTHNAK); + /* * XXX If no passwd, let them login without one. */ |