diff options
-rw-r--r-- | sbin/clri/clri.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c index 4ad511304dc..a82238f6bad 100644 --- a/sbin/clri/clri.c +++ b/sbin/clri/clri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clri.c,v 1.16 2015/02/06 11:49:39 tedu Exp $ */ +/* $OpenBSD: clri.c,v 1.17 2015/10/12 01:43:52 deraadt Exp $ */ /* $NetBSD: clri.c,v 1.19 2005/01/20 15:50:47 xtraeme Exp $ */ /* @@ -78,6 +78,8 @@ main(int argc, char *argv[]) /* get the superblock. */ if ((fd = open(fs, O_RDWR, 0)) < 0) err(1, "%s", fs); + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); for (i = 0; sblock_try[i] != -1; i++) { offset = (off_t)(sblock_try[i]); if (pread(fd, sblock, sizeof(sblock), offset) != sizeof(sblock)) |