From: deraadt Date: Sun, 11 Oct 2015 04:37:23 +0000 (+0000) Subject: After the filesystem is opened, pledge "stdio" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7f8d1e1e103d0b1b2d1683c5b22dcd0fac0dcba2;p=openbsd After the filesystem is opened, pledge "stdio" ok doug --- diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index 316d43bad54..be3146b8c70 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsirand.c,v 1.34 2015/03/20 01:53:05 millert Exp $ */ +/* $OpenBSD: fsirand.c,v 1.35 2015/10/11 04:37:23 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller @@ -121,6 +121,9 @@ fsirand(char *device) bsize = label.d_secsize; } + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + /* Read in master superblock */ (void)memset(&sbuf, 0, sizeof(sbuf)); sblock = (struct fs *)&sbuf;