diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-11 04:37:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-11 04:37:24 +0000 |
commit | 9f47a735ef87964388a2749b5465c977298f92cb (patch) | |
tree | 983a8a85c04549adffe02acdd167dbccf8b67e9b /sbin/fsirand | |
parent | ceada22f39d2a5b7f3948bd5a90f213043b82558 (diff) |
After the filesystem is opened, pledge "stdio"
ok doug
Diffstat (limited to 'sbin/fsirand')
-rw-r--r-- | sbin/fsirand/fsirand.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <Todd.Miller@courtesan.com> @@ -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; |