diff options
author | mpp <mpp@FreeBSD.org> | 1995-08-28 21:30:59 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1995-08-28 21:30:59 +0000 |
commit | 684146e8cecf2a925a3b2281a218c99678a04171 (patch) | |
tree | 67278d75d3abf5f6772c71401cc931a0c8700dee /libexec/rshd/rshd.c | |
parent | 3e1e7bcd42e9e4ca3c52ddefa6bc62b4df57add2 (diff) | |
download | FreeBSD-src-684146e8cecf2a925a3b2281a218c99678a04171.zip FreeBSD-src-684146e8cecf2a925a3b2281a218c99678a04171.tar.gz |
Check for expired passwords before allowing access to the system.
Diffstat (limited to 'libexec/rshd/rshd.c')
-rw-r--r-- | libexec/rshd/rshd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 1b9eea9..7763601 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'", |