From: deraadt Date: Fri, 16 Oct 2015 22:53:32 +0000 (+0000) Subject: pledge "stdio rpath wpath cpath proc exec". X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1e80dbee749a5a8f9811ff81d92a11fd05f19eee;p=openbsd pledge "stdio rpath wpath cpath proc exec". --- diff --git a/usr.sbin/zic/zic.c b/usr.sbin/zic/zic.c index 08e0ed626f6..a63a1c5704c 100644 --- a/usr.sbin/zic/zic.c +++ b/usr.sbin/zic/zic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zic.c,v 1.20 2015/04/23 05:26:33 deraadt Exp $ */ +/* $OpenBSD: zic.c,v 1.21 2015/10/16 22:53:32 deraadt Exp $ */ /* ** This file is in the public domain, so clarified as of ** 2006-07-17 by Arthur David Olson. @@ -508,6 +508,9 @@ main(int argc, char **argv) { int i, j, c; + if (pledge("stdio rpath wpath cpath proc exec", NULL) == -1) + err(1, "pledge"); + umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH)); while ((c = getopt(argc, argv, "d:l:p:L:vy:")) != -1) switch (c) {