From: deraadt Date: Sun, 11 Oct 2015 04:33:17 +0000 (+0000) Subject: After the disk is opened, this can pledge "stdio". X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c05fbe6b3119eb06bfae2c0134ae39cacf6b5bed;p=openbsd After the disk is opened, this can pledge "stdio". ok doug --- diff --git a/sbin/scan_ffs/scan_ffs.c b/sbin/scan_ffs/scan_ffs.c index 0352246d755..8c8e6bfcaf5 100644 --- a/sbin/scan_ffs/scan_ffs.c +++ b/sbin/scan_ffs/scan_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scan_ffs.c,v 1.19 2015/01/20 18:22:21 deraadt Exp $ */ +/* $OpenBSD: scan_ffs.c,v 1.20 2015/10/11 04:33:17 deraadt Exp $ */ /* * Copyright (c) 1998 Niklas Hallqvist, Tobias Weingartner @@ -173,5 +173,8 @@ main(int argc, char *argv[]) if (fd < 0) err(1, "%s", argv[0]); + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + return (ufsscan(fd, beg, end, flags)); }