summaryrefslogtreecommitdiffstats
path: root/libexec/rexecd
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/rexecd
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/rexecd')
-rw-r--r--libexec/rexecd/rexecd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c
index 5fc3617..9c6d029 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);
OpenPOWER on IntegriCloud