diff options
-rw-r--r-- | sbin/fsck_ext2fs/main.c | 7 | ||||
-rw-r--r-- | sbin/fsck_ffs/main.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sbin/fsck_ext2fs/main.c b/sbin/fsck_ext2fs/main.c index 2c2ecefdca3..f7c38ce4956 100644 --- a/sbin/fsck_ext2fs/main.c +++ b/sbin/fsck_ext2fs/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.24 2015/11/23 19:19:30 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.25 2015/11/23 23:01:20 deraadt Exp $ */ /* $NetBSD: main.c,v 1.1 1997/06/11 11:21:50 bouyer Exp $ */ /* @@ -158,8 +158,9 @@ checkfilesys(char *filesys, char *mntpt, long auxdata, int child) if (debug && preen) pwarn("starting\n"); - if (pledge("stdio rpath wpath getpw disklabel", NULL) == -1) - err(1, "pledge"); + if (!hotroot()) + if (pledge("stdio rpath wpath getpw disklabel", NULL) == -1) + err(1, "pledge"); switch (setup(filesys)) { case 0: diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index c373b416bc4..d2d0c86d4a4 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.47 2015/11/23 19:19:30 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.48 2015/11/23 23:01:20 deraadt Exp $ */ /* $NetBSD: main.c,v 1.22 1996/10/11 20:15:48 thorpej Exp $ */ /* @@ -170,8 +170,9 @@ checkfilesys(char *filesys, char *mntpt, long auxdata, int child) if (debug && preen) pwarn("starting\n"); - if (pledge("stdio rpath wpath getpw disklabel", NULL) == -1) - err(1, "pledge"); + if (!hotroot()) + if (pledge("stdio rpath wpath getpw disklabel", NULL) == -1) + err(1, "pledge"); switch (setup(filesys)) { case 0: |