From 47fa4d08ab3fab6455c450827c3dffe65797b6f5 Mon Sep 17 00:00:00 2001 From: doug Date: Sat, 10 Oct 2015 22:36:46 +0000 Subject: [PATCH] Pledge that ln only needs "stdio rpath cpath". ok deraadt@ --- bin/ln/ln.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ln/ln.c b/bin/ln/ln.c index 653875cc84a..329b3d4147c 100644 --- a/bin/ln/ln.c +++ b/bin/ln/ln.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ln.c,v 1.22 2015/01/16 06:39:32 deraadt Exp $ */ +/* $OpenBSD: ln.c,v 1.23 2015/10/10 22:36:46 doug Exp $ */ /* $NetBSD: ln.c,v 1.10 1995/03/21 09:06:10 cgd Exp $ */ /* @@ -58,6 +58,9 @@ main(int argc, char *argv[]) int ch, exitval; char *sourcedir; + if (pledge("stdio rpath cpath", NULL) == -1) + err(1, "pledge"); + while ((ch = getopt(argc, argv, "fhLnPs")) != -1) switch (ch) { case 'f': -- 2.20.1