artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db21a05
)
can pledge "stdio" after opening device.
author
deraadt
<deraadt@openbsd.org>
Tue, 13 Oct 2015 15:15:30 +0000
(15:15 +0000)
committer
deraadt
<deraadt@openbsd.org>
Tue, 13 Oct 2015 15:15:30 +0000
(15:15 +0000)
sbin/newfs_ext2fs/newfs_ext2fs.c
patch
|
blob
|
history
diff --git
a/sbin/newfs_ext2fs/newfs_ext2fs.c
b/sbin/newfs_ext2fs/newfs_ext2fs.c
index
4fdae02
..
9060472
100644
(file)
--- a/
sbin/newfs_ext2fs/newfs_ext2fs.c
+++ b/
sbin/newfs_ext2fs/newfs_ext2fs.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: newfs_ext2fs.c,v 1.1
5 2015/01/16 06:40:0
0 deraadt Exp $ */
+/* $OpenBSD: newfs_ext2fs.c,v 1.1
6 2015/10/13 15:15:3
0 deraadt Exp $ */
/* $NetBSD: newfs_ext2fs.c,v 1.8 2009/03/02 10:38:13 tsutsui Exp $ */
/*
@@
-296,6
+296,10
@@
main(int argc, char *argv[])
}
pp = getpartition(fsi, special, argv, &lp);
+
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if (!Iflag) {
static const char m[] =
"%s partition type is not `%s' (or use -I)";