From: deraadt Date: Tue, 13 Oct 2015 15:15:30 +0000 (+0000) Subject: can pledge "stdio" after opening device. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d73dc91a28d5283bb0bfa32f56876e0998624471;p=openbsd can pledge "stdio" after opening device. --- diff --git a/sbin/newfs_ext2fs/newfs_ext2fs.c b/sbin/newfs_ext2fs/newfs_ext2fs.c index 4fdae02f3b0..9060472e74c 100644 --- a/sbin/newfs_ext2fs/newfs_ext2fs.c +++ b/sbin/newfs_ext2fs/newfs_ext2fs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs_ext2fs.c,v 1.15 2015/01/16 06:40:00 deraadt Exp $ */ +/* $OpenBSD: newfs_ext2fs.c,v 1.16 2015/10/13 15:15:30 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)";