summaryrefslogtreecommitdiff
path: root/usr.bin/lndir
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-10 14:23:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-10 14:23:13 +0000
commit38ee5535d95b8af17fa92373365d059b14fa7016 (patch)
tree89543ec4f48d259b5064e963733c90a5594f4d3e /usr.bin/lndir
parent0a9d5c4ba27a208e4d7e2a153432d57ae5fc9ed3 (diff)
fairly simple pledge to "stdio rpath wpath cpath"
Diffstat (limited to 'usr.bin/lndir')
-rw-r--r--usr.bin/lndir/lndir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/lndir/lndir.c b/usr.bin/lndir/lndir.c
index 75bcc457745..cb2369c3475 100644
--- a/usr.bin/lndir/lndir.c
+++ b/usr.bin/lndir/lndir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lndir.c,v 1.21 2015/01/16 06:40:09 deraadt Exp $ */
+/* $OpenBSD: lndir.c,v 1.22 2015/10/10 14:23:12 deraadt Exp $ */
/* $XConsortium: lndir.c /main/15 1995/08/30 10:56:18 gildea $ */
/*
@@ -85,6 +85,9 @@ main(int argc, char *argv[])
struct stat fs, ts;
char *fn, *tn;
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ err(1, "pledge");
+
while (++argv, --argc) {
if ((strcmp(*argv, "-silent") == 0) ||
(strcmp(*argv, "-s") == 0))