From 77a23bb4fdee951edc7fd9516f6ba455a4ce08f9 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 11 Nov 2015 03:20:20 +0000 Subject: exit on pledge failure, oops --- usr.sbin/cron/cron.c | 6 ++++-- 1 file 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(); -- cgit v1.2.3