summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/do_command.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-01-14 17:27:51 +0000
committermillert <millert@openbsd.org>2015-01-14 17:27:51 +0000
commit27802abd9ba240d10bceaa25074a7c3ea9ad2422 (patch)
tree6c7274840a11451ee3741bb8db125e4069389553 /usr.sbin/cron/do_command.c
parentUse standard types for wait, readdir, signals and pids. (diff)
downloadwireguard-openbsd-27802abd9ba240d10bceaa25074a7c3ea9ad2422.tar.xz
wireguard-openbsd-27802abd9ba240d10bceaa25074a7c3ea9ad2422.zip
Use HAVE_FOO for BSD-specific features instead of relying on the
BSD macro from sys/param.h.
Diffstat (limited to 'usr.sbin/cron/do_command.c')
-rw-r--r--usr.sbin/cron/do_command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c
index d647656ae3c..3f650b19a65 100644
--- a/usr.sbin/cron/do_command.c
+++ b/usr.sbin/cron/do_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: do_command.c,v 1.39 2015/01/14 17:27:30 millert Exp $ */
+/* $OpenBSD: do_command.c,v 1.40 2015/01/14 17:27:51 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -234,9 +234,9 @@ child_process(entry *e, user *u) {
"unable to set groups for %s\n", e->pwd->pw_name);
_exit(EXIT_FAILURE);
}
-#if (defined(BSD)) && (BSD >= 199103)
+#ifdef HAVE_SETLOGIN
setlogin(usernm);
-#endif /* BSD */
+#endif
if (setuid(e->pwd->pw_uid)) {
fprintf(stderr,
"unable to set uid to %lu\n",