summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-11-03 21:10:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-11-03 21:10:09 +0000
commit50bed4fc63f774d39185ef88ee15cc1dd6988648 (patch)
tree5eba3256b4b8dcb53b61e26049b6e41fc4c0bf6a
parentf0a687b62f4d4b3d5989e37621c5bbb77a2c1c91 (diff)
If pledge(2) fails use perror instead of log_it(RealUser, ...) since
RealUser has not been filled in yet.
-rw-r--r--usr.sbin/cron/crontab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index 9745da0a42c..b6fee330734 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.80 2015/11/03 16:30:31 millert Exp $ */
+/* $OpenBSD: crontab.c,v 1.81 2015/11/03 21:10:08 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -74,8 +74,8 @@ main(int argc, char *argv[])
if (pledge("stdio rpath wpath cpath fattr getpw unix flock id proc exec",
NULL) == -1) {
- log_it(RealUser, getpid(), "pledge", strerror(errno));
- exit(1);
+ perror("pledge");
+ exit(EXIT_FAILURE);
}
setlocale(LC_ALL, "");