summaryrefslogtreecommitdiffstats
path: root/libexec/rshd
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1995-08-28 21:30:59 +0000
committermpp <mpp@FreeBSD.org>1995-08-28 21:30:59 +0000
commit684146e8cecf2a925a3b2281a218c99678a04171 (patch)
tree67278d75d3abf5f6772c71401cc931a0c8700dee /libexec/rshd
parent3e1e7bcd42e9e4ca3c52ddefa6bc62b4df57add2 (diff)
downloadFreeBSD-src-684146e8cecf2a925a3b2281a218c99678a04171.zip
FreeBSD-src-684146e8cecf2a925a3b2281a218c99678a04171.tar.gz
Check for expired passwords before allowing access to the system.
Diffstat (limited to 'libexec/rshd')
-rw-r--r--libexec/rshd/rshd.c5
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'",
OpenPOWER on IntegriCloud