From 53d5d36225c303d44ef9f5a77b5453532d12b7c3 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 14:23:12 +0000 Subject: [PATCH] fairly simple pledge to "stdio rpath wpath cpath" --- usr.bin/lndir/lndir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- 2.20.1