summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2023-01-16 07:09:13 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2023-01-16 07:09:13 +0000
commite3cc3646043588ee92c0620ea65228694d04f9d9 (patch)
tree69c0307f5ca5f8c9259ce0193ac53f9966b1ca89 /lib
parent9d064db0a2a6e9cebcb374ca76fb50f4c069a39b (diff)
Currently we disable kbind(2) for static program from libc.a's
preinit hook. Delete that and instead have the kernel disable kbind at exec-time if the program doesn't have an ELF interpreter. For now, permit userland calls to disable it when already disabled so existing static programs continue to work. prompted by deraadt@ questioning about the call in libc.a ok deraadt@ miod@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/dlfcn/init.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libc/dlfcn/init.c b/lib/libc/dlfcn/init.c
index 98766b80039..48c062cef55 100644
--- a/lib/libc/dlfcn/init.c
+++ b/lib/libc/dlfcn/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.11 2022/12/27 17:10:06 jmc Exp $ */
+/* $OpenBSD: init.c,v 1.12 2023/01/16 07:09:12 guenther Exp $ */
/*
* Copyright (c) 2014,2015 Philip Guenther <guenther@openbsd.org>
*
@@ -205,17 +205,13 @@ _csu_finish(char **argv, char **envp, void (*cleanup)(void))
#ifndef PIC
/*
- * static libc in a static link? Then disable kbind and set up
- * __progname and environ
+ * static libc in a static link? Then set up __progname and environ
*/
static inline void
early_static_init(char **argv, char **envp)
{
static char progname_storage[NAME_MAX+1];
- /* disable kbind */
- syscall(SYS_kbind, (void *)NULL, (size_t)0, (long long)0);
-
environ = envp;
/* set up __progname */