From 4312bb3fa34d39f8258d5e1e5dd01eacbb711510 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 19 Nov 2015 06:05:41 +0000 Subject: pledge "stdio rpath proc exec" for entire lifetime. rpath must remain even late, because of access() before doing wasteful fork+execs. --- usr.sbin/hotplugd/hotplugd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.sbin/hotplugd') diff --git a/usr.sbin/hotplugd/hotplugd.c b/usr.sbin/hotplugd/hotplugd.c index 412b1125474..2e23bc7c19e 100644 --- a/usr.sbin/hotplugd/hotplugd.c +++ b/usr.sbin/hotplugd/hotplugd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hotplugd.c,v 1.12 2010/01/10 13:20:41 grange Exp $ */ +/* $OpenBSD: hotplugd.c,v 1.13 2015/11/19 06:05:40 deraadt Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -61,6 +61,9 @@ main(int argc, char *argv[]) struct sigaction sact; struct hotplug_event he; + if (pledge("stdio rpath proc exec", NULL) == -1) + err(1, "pledge"); + while ((ch = getopt(argc, argv, "d:")) != -1) switch (ch) { case 'd': -- cgit v1.2.3