diff options
Diffstat (limited to 'libexec/atrun')
-rw-r--r-- | libexec/atrun/atrun.c | 11 |
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"); |