summaryrefslogtreecommitdiffstats
path: root/libexec/rexecd/rexecd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rexecd/rexecd.c')
-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