-/* $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 $ */
/*
/* 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))