From: deraadt Date: Mon, 12 Oct 2015 06:24:28 +0000 (+0000) Subject: pledge "stdio" after opening up the input & output files. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=43df60e4e4359956898847648e809b43940a489f;p=openbsd pledge "stdio" after opening up the input & output files. ok jsg --- diff --git a/usr.sbin/mkuboot/mkuboot.c b/usr.sbin/mkuboot/mkuboot.c index 6f5cd69f4ca..36103366fb8 100644 --- 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:18 deraadt Exp $ */ +/* $OpenBSD: mkuboot.c,v 1.6 2015/10/12 06:24:28 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);