summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authormestre <mestre@openbsd.org>2016-11-08 09:43:59 +0000
committermestre <mestre@openbsd.org>2016-11-08 09:43:59 +0000
commitec9c1e3933a163274744dbc7fe5619555f4f79da (patch)
tree9befe7b83fa29675901444741419e6f651be2145 /usr.sbin/makefs
parentRemove redundant & when clearing hostname variable, as per otto@'s request (diff)
downloadwireguard-openbsd-ec9c1e3933a163274744dbc7fe5619555f4f79da.tar.xz
wireguard-openbsd-ec9c1e3933a163274744dbc7fe5619555f4f79da.zip
pledge for "stdio rpath wpath cpath" promises since it only needs to
read/write/create files OK natano@ and tb@, thank you both for noticing the bad indentation
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/makefs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c
index 38223e3b347..60a108ce55f 100644
--- a/usr.sbin/makefs/makefs.c
+++ b/usr.sbin/makefs/makefs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makefs.c,v 1.17 2016/10/26 07:53:47 natano Exp $ */
+/* $OpenBSD: makefs.c,v 1.18 2016/11/08 09:43:59 mestre Exp $ */
/* $NetBSD: makefs.c,v 1.53 2015/11/27 15:10:32 joerg Exp $ */
/*
@@ -198,6 +198,9 @@ main(int argc, char *argv[])
if (argc != 2)
usage();
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ err(1, "pledge");
+
/* walk the tree */
root = walk_dir(argv[1], ".", NULL, NULL);