diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-01-14 17:27:52 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-01-14 17:27:52 +0000 |
commit | efed2175850caf17558cbc375a79acbad8f3820b (patch) | |
tree | 7226e4b7f4ef80e8047718d059668e10039281c9 /usr.sbin/cron/atrun.c | |
parent | 0d4746936ec06236485d8677a1f7aeeb6e323542 (diff) |
Use HAVE_FOO for BSD-specific features instead of relying on the
BSD macro from sys/param.h.
Diffstat (limited to 'usr.sbin/cron/atrun.c')
-rw-r--r-- | usr.sbin/cron/atrun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/atrun.c b/usr.sbin/cron/atrun.c index 52f9070e5f4..26c17da6c00 100644 --- a/usr.sbin/cron/atrun.c +++ b/usr.sbin/cron/atrun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atrun.c,v 1.21 2015/01/14 17:27:29 millert Exp $ */ +/* $OpenBSD: atrun.c,v 1.22 2015/01/14 17:27:51 millert Exp $ */ /* * Copyright (c) 2002-2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -284,7 +284,7 @@ run_job(atjob *job, char *atfile) log_it("CRON", getpid(), "ORPHANED JOB", atfile); _exit(EXIT_FAILURE); } -#if (defined(BSD)) && (BSD >= 199103) +#ifdef HAVE_PW_EXPIRE if (pw->pw_expire && time(NULL) >= pw->pw_expire) { log_it(pw->pw_name, getpid(), "ACCOUNT EXPIRED, JOB ABORTED", atfile); @@ -459,7 +459,7 @@ run_job(atjob *job, char *atfile) "unable to set groups for %s\n", pw->pw_name); _exit(EXIT_FAILURE); } -#if (defined(BSD)) && (BSD >= 199103) +#ifdef HAVE_SETLOGIN setlogin(pw->pw_name); #endif if (setuid(pw->pw_uid)) { |