diff options
Diffstat (limited to 'sbin/tunefs')
-rw-r--r-- | sbin/tunefs/tunefs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index e363ff97afb..283450b44d7 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tunefs.c,v 1.38 2015/10/12 02:01:15 deraadt Exp $ */ +/* $OpenBSD: tunefs.c,v 1.39 2015/11/23 19:19:30 deraadt Exp $ */ /* $NetBSD: tunefs.c,v 1.33 2005/01/19 20:46:16 xtraeme Exp $ */ /* @@ -147,6 +147,14 @@ main(int argc, char *argv[]) if (argc != 1) usage(); + if (Nflag) + if (pledge("stdio rpath disklabel", NULL) == -1) + err(1, "pledge"); + else { + if (pledge("stdio rpath wpath disklabel", NULL) == -1) + err(1, "pledge"); + } + special = argv[0]; openflags = Nflag ? O_RDONLY : O_RDWR; if (Fflag) |