summaryrefslogtreecommitdiffstats
path: root/bin/ln
diff options
context:
space:
mode:
authordoug <doug@openbsd.org>2015-10-10 22:36:46 +0000
committerdoug <doug@openbsd.org>2015-10-10 22:36:46 +0000
commit47fa4d08ab3fab6455c450827c3dffe65797b6f5 (patch)
treeee088b33375e89d3a71330acb99b948fc9c0ff2e /bin/ln
parentpflogd contained the same "privsep error" as tcpdump -- assuming that (diff)
downloadwireguard-openbsd-47fa4d08ab3fab6455c450827c3dffe65797b6f5.tar.xz
wireguard-openbsd-47fa4d08ab3fab6455c450827c3dffe65797b6f5.zip
Pledge that ln only needs "stdio rpath cpath".
ok deraadt@
Diffstat (limited to 'bin/ln')
-rw-r--r--bin/ln/ln.c5
1 files changed, 4 insertions, 1 deletions
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':