Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Allow execution of shared objects. This is silly, b...
details: https://anonhg.NetBSD.org/src/rev/a0fad6dc74b8
branches: trunk
changeset: 474157:a0fad6dc74b8
user: fvdl <fvdl%NetBSD.org@localhost>
date: Tue Jun 29 23:39:06 1999 +0000
description:
Allow execution of shared objects. This is silly, but is allowed in,
for example, Solaris and Linux, and at least one Linux ldd implementation
even depends on it.
diffstat:
sys/kern/exec_elf32.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r d3a53929e0d2 -r a0fad6dc74b8 sys/kern/exec_elf32.c
--- a/sys/kern/exec_elf32.c Tue Jun 29 22:31:32 1999 +0000
+++ b/sys/kern/exec_elf32.c Tue Jun 29 23:39:06 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf32.c,v 1.44 1999/04/30 23:02:06 cgd Exp $ */
+/* $NetBSD: exec_elf32.c,v 1.45 1999/06/29 23:39:06 fvdl Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -526,7 +526,12 @@
if (epp->ep_hdrvalid < sizeof(Elf_Ehdr))
return ENOEXEC;
- if (ELFNAME(check_header)(eh, Elf_et_exec))
+ /*
+ * XXX allow for executing shared objects. It seems silly
+ * but other ELF-based systems allow it as well.
+ */
+ if (ELFNAME(check_header)(eh, Elf_et_exec) != 0 &&
+ ELFNAME(check_header)(eh, Elf_et_dyn) != 0)
return ENOEXEC;
/*
Home |
Main Index |
Thread Index |
Old Index