pledge to only use "stdio rpath"; rpath is for readig the wtmp files.
authorderaadt <deraadt@openbsd.org>
Mon, 12 Oct 2015 02:02:00 +0000 (02:02 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 12 Oct 2015 02:02:00 +0000 (02:02 +0000)
ok doug

usr.sbin/ac/ac.c

index d1628e6..3e9da2f 100644 (file)
@@ -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) {