From c05fbe6b3119eb06bfae2c0134ae39cacf6b5bed Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 11 Oct 2015 04:33:17 +0000 Subject: [PATCH] After the disk is opened, this can pledge "stdio". ok doug --- sbin/scan_ffs/scan_ffs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)); } -- 2.20.1