diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-12 07:45:49 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-12 07:45:49 +0000 |
commit | 6844fcfa2a57de075381410173e9ea51b62ec6ba (patch) | |
tree | 989a4009a5ff6cc0eeede92f92c42c4d3d974f88 /usr.sbin/mksuncd | |
parent | fb25869f2c7acfe14a083d8a7a917d37f256334c (diff) |
pledge "stdio" after opening files, code is very similar to mkuboot
Diffstat (limited to 'usr.sbin/mksuncd')
-rw-r--r-- | usr.sbin/mksuncd/mksuncd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/mksuncd/mksuncd.c b/usr.sbin/mksuncd/mksuncd.c index 75428c3c087..dc6becb3422 100644 --- a/usr.sbin/mksuncd/mksuncd.c +++ b/usr.sbin/mksuncd/mksuncd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mksuncd.c,v 1.2 2010/02/25 17:15:42 deraadt Exp $ */ +/* $OpenBSD: mksuncd.c,v 1.3 2015/10/12 07:45:48 deraadt Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -225,6 +225,9 @@ main(int argc, char **argv) if (of == -1) err(1, "open"); + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + if (get_label(bf, &sl)) return (1); |