From 9456c97f71048af3ac89457c86dab16c9ee4d5ba Mon Sep 17 00:00:00 2001 From: benno Date: Sun, 18 Oct 2015 22:37:30 +0000 Subject: [PATCH] pledge bgplg(8). ok deraadt --- usr.bin/bgplg/bgplg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.bin/bgplg/bgplg.c b/usr.bin/bgplg/bgplg.c index 89536ce66fa..a613f40faf3 100644 --- a/usr.bin/bgplg/bgplg.c +++ b/usr.bin/bgplg/bgplg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgplg.c,v 1.13 2015/01/16 06:40:06 deraadt Exp $ */ +/* $OpenBSD: bgplg.c,v 1.14 2015/10/18 22:37:30 benno Exp $ */ /* * Copyright (c) 2005, 2006 Reyk Floeter @@ -28,6 +28,7 @@ #include #include #include +#include #include "bgplg.h" @@ -253,6 +254,9 @@ main(void) u_int i; struct cmd *cmdp = NULL; + if (pledge("stdio rpath proc exec", NULL) == -1) + err(1, "pledge"); + if (gethostname(myname, sizeof(myname)) != 0) return (1); -- 2.20.1