summaryrefslogtreecommitdiffstats
path: root/libexec/atrun
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/atrun
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/atrun')
-rw-r--r--libexec/atrun/atrun.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c
index 9bd7aca..8ff1bfa 100644
--- a/libexec/atrun/atrun.c
+++ b/libexec/atrun/atrun.c
@@ -71,7 +71,7 @@
/* File scope variables */
static char *namep;
-static char rcsid[] = "$Id: atrun.c,v 1.5 1995/08/10 04:06:53 ache Exp $";
+static char rcsid[] = "$Id: atrun.c,v 1.5 1995/08/21 12:34:17 ache Exp $";
static debug = 0;
void perr(const char *a);
@@ -154,6 +154,15 @@ run_file(const char *filename, uid_t uid, gid_t gid)
PRIV_END
+#ifdef __FreeBSD__
+ if (pentry->pw_expire && time(NULL) >= pentry->pw_expire)
+ {
+ syslog(LOG_ERR, "Userid %lu is expired - aborting job %s",
+ (unsigned long) uid, filename);
+ exit(EXIT_FAILURE);
+ }
+#endif
+
if (stream == NULL)
perr("Cannot open input file");
OpenPOWER on IntegriCloud