From b808fb874b0c1a9ccbbc3a78e03e9fcd2cc7cdba Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 18:58:53 +0000 Subject: [PATCH] pledge "stdio getpw rpath wpath cpath fattr". doug pointed out getpw* use, and fattr for chmod. doug --- usr.bin/rcs/rcsprog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c index adad6a1d596..f6a1996abf3 100644 --- a/usr.bin/rcs/rcsprog.c +++ b/usr.bin/rcs/rcsprog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.c,v 1.156 2015/06/13 20:15:21 nicm Exp $ */ +/* $OpenBSD: rcsprog.c,v 1.157 2015/10/10 18:58:53 deraadt Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau * All rights reserved. @@ -128,6 +128,9 @@ main(int argc, char **argv) char **cmd_argv; int ret, cmd_argc; + if (pledge("stdio getpw rpath wpath cpath fattr", NULL) == -1) + err(1, "pledge"); + ret = -1; rcs_optind = 1; SLIST_INIT(&temp_files); -- 2.20.1