summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/tame.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-09 01:24:57 +0000
committerderaadt <deraadt@openbsd.org>2015-10-09 01:24:57 +0000
commit4c738cc8dfcda4dd9f8b01ab736a275a5eeb36f7 (patch)
tree15710f9fa802033a946ecacf92f5b02423e41939 /lib/libc/sys/tame.c
parentRename tame() to pledge(). This fairly interface has evolved to be more (diff)
downloadwireguard-openbsd-4c738cc8dfcda4dd9f8b01ab736a275a5eeb36f7.tar.xz
wireguard-openbsd-4c738cc8dfcda4dd9f8b01ab736a275a5eeb36f7.zip
tame -> pledge conversion, in libc. I should crank libc, but am cheating
hoping things go well. The old symbol is faked via a stupid stub function, until next major crank when it can be removed. I am expecting guenther to scream at me.
Diffstat (limited to 'lib/libc/sys/tame.c')
-rw-r--r--lib/libc/sys/tame.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/libc/sys/tame.c b/lib/libc/sys/tame.c
new file mode 100644
index 00000000000..4774a17afeb
--- /dev/null
+++ b/lib/libc/sys/tame.c
@@ -0,0 +1,17 @@
+/* $OpenBSD: tame.c,v 1.1 2015/10/09 01:24:57 deraadt Exp $ */
+/*
+ * Written by Artur Grabowski <art@openbsd.org> Public Domain
+ */
+
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+
+int tame(const char *req, const char **paths);
+
+int
+tame(const char *req, const char **paths)
+{
+ return (pledge(req, paths));
+}
+DEF_WEAK(mquery);