diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-11 03:20:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-11 03:20:20 +0000 |
commit | 77a23bb4fdee951edc7fd9516f6ba455a4ce08f9 (patch) | |
tree | 5df10a5d5c15364c3de9c611a69c450225c555a7 /usr.sbin | |
parent | d853ec59235291d9d9f1fcbecf962bd8d57fbfc8 (diff) |
exit on pledge failure, oops
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/cron/cron.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/cron/cron.c b/usr.sbin/cron/cron.c index ffef86492ac..c986f91b042 100644 --- a/usr.sbin/cron/cron.c +++ b/usr.sbin/cron/cron.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cron.c,v 1.66 2015/11/09 16:37:07 millert Exp $ */ +/* $OpenBSD: cron.c,v 1.67 2015/11/11 03:20:19 deraadt Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -100,8 +100,10 @@ main(int argc, char *argv[]) set_cron_cwd(); if (pledge("stdio rpath wpath cpath fattr getpw unix flock id dns proc exec", - NULL) == -1) + NULL) == -1) { log_it("CRON", "pledge", strerror(errno)); + exit(EXIT_FAILURE); + } cronSock = open_socket(); |