diff options
author | deraadt <deraadt@openbsd.org> | 2015-10-28 20:17:31 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2015-10-28 20:17:31 +0000 |
commit | 2da949c63ee2397737b052549251752e68ad8ee2 (patch) | |
tree | d1d0cf55b57102f4dd39d992bca0fbc950164498 /usr.sbin/cron/crontab.c | |
parent | Revert GPT change. Breaks non-GPT install/upgrade. (diff) | |
download | wireguard-openbsd-2da949c63ee2397737b052549251752e68ad8ee2.tar.xz wireguard-openbsd-2da949c63ee2397737b052549251752e68ad8ee2.zip |
pledge
ok millert
Diffstat (limited to 'usr.sbin/cron/crontab.c')
-rw-r--r-- | usr.sbin/cron/crontab.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c index 17830229cdb..77ce0a70d0e 100644 --- a/usr.sbin/cron/crontab.c +++ b/usr.sbin/cron/crontab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crontab.c,v 1.74 2015/10/26 15:50:06 millert Exp $ */ +/* $OpenBSD: crontab.c,v 1.75 2015/10/28 20:17:31 deraadt Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -68,6 +68,12 @@ main(int argc, char *argv[]) Pid = getpid(); ProgramName = argv[0]; + if (pledge("stdio rpath wpath cpath fattr getpw unix flock id", + NULL) == -1) { + log_it(RealUser, getpid(), "pledge", strerror(errno)); + exit(1); + } + setlocale(LC_ALL, ""); setvbuf(stderr, NULL, _IOLBF, 0); |