summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-11-03 04:47:56 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-11-03 04:47:56 +0000
commita4457d33c90945850fa3452a49d7f3afdff8175c (patch)
tree433cb7b785147ff322caf6fd1a76dc0c4df1f763 /sbin
parent56e1917121f1f9f4e30dd1902fa3ed514b142aba (diff)
Add blank lines surrounding pledge call, as per decree of deraadt@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/clri/clri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c
index a82238f6bad..23a3ac0a87a 100644
--- a/sbin/clri/clri.c
+++ b/sbin/clri/clri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clri.c,v 1.17 2015/10/12 01:43:52 deraadt Exp $ */
+/* $OpenBSD: clri.c,v 1.18 2015/11/03 04:47:55 mmcc Exp $ */
/* $NetBSD: clri.c,v 1.19 2005/01/20 15:50:47 xtraeme Exp $ */
/*
@@ -78,8 +78,10 @@ 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))