artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c00aea
)
pledge "stdio" after opening up the input & output files.
author
deraadt
<deraadt@openbsd.org>
Mon, 12 Oct 2015 06:24:28 +0000
(06:24 +0000)
committer
deraadt
<deraadt@openbsd.org>
Mon, 12 Oct 2015 06:24:28 +0000
(06:24 +0000)
ok jsg
usr.sbin/mkuboot/mkuboot.c
patch
|
blob
|
history
diff --git
a/usr.sbin/mkuboot/mkuboot.c
b/usr.sbin/mkuboot/mkuboot.c
index
6f5cd69
..
3610336
100644
(file)
--- a/
usr.sbin/mkuboot/mkuboot.c
+++ b/
usr.sbin/mkuboot/mkuboot.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: mkuboot.c,v 1.
5 2015/10/12 05:54:1
8 deraadt Exp $ */
+/* $OpenBSD: mkuboot.c,v 1.
6 2015/10/12 06:24:2
8 deraadt Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@
-230,6
+230,9
@@
main(int argc, char *argv[])
if (ofd < 0)
err(1, "%s", oname);
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
/* Write initial header. */
if (write(ofd, &ih, sizeof ih) != sizeof ih)
err(1, "%s", oname);