summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ac
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-12 02:02:00 +0000
committerderaadt <deraadt@openbsd.org>2015-10-12 02:02:00 +0000
commit4823dc0ddf08099cd78e73de28f99f459ae836df (patch)
treec95c67a1318de818f82e10e1f3bc35c3d78b1265 /usr.sbin/ac
parenttunefs can pledge to only use "stdio", after it has opened the device. (diff)
downloadwireguard-openbsd-4823dc0ddf08099cd78e73de28f99f459ae836df.tar.xz
wireguard-openbsd-4823dc0ddf08099cd78e73de28f99f459ae836df.zip
pledge to only use "stdio rpath"; rpath is for readig the wtmp files.
ok doug
Diffstat (limited to 'usr.sbin/ac')
-rw-r--r--usr.sbin/ac/ac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c
index d1628e62b6f..3e9da2f9f5d 100644
--- a/usr.sbin/ac/ac.c
+++ b/usr.sbin/ac/ac.c
@@ -200,6 +200,9 @@ main(int argc, char *argv[])
FILE *fp;
int c;
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+
fp = NULL;
while ((c = getopt(argc, argv, "Ddpt:w:")) != -1) {
switch (c) {