Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/freebsd back previous off, it makes the probe fun...
details: https://anonhg.NetBSD.org/src/rev/20c97722afb8
branches: trunk
changeset: 539876:20c97722afb8
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Thu Nov 28 15:08:36 2002 +0000
description:
back previous off, it makes the probe function mistaken some linux
binaries as freebsd
problem reported in thread 'installing suse_base on current
i386 sets time to 1970' on current-users
diffstat:
sys/compat/freebsd/freebsd_exec_elf32.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diffs (48 lines):
diff -r b90dce04ed47 -r 20c97722afb8 sys/compat/freebsd/freebsd_exec_elf32.c
--- a/sys/compat/freebsd/freebsd_exec_elf32.c Thu Nov 28 14:18:31 2002 +0000
+++ b/sys/compat/freebsd/freebsd_exec_elf32.c Thu Nov 28 15:08:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: freebsd_exec_elf32.c,v 1.7 2002/11/19 22:38:07 christos Exp $ */
+/* $NetBSD: freebsd_exec_elf32.c,v 1.8 2002/11/28 15:08:36 jdolecek Exp $ */
/*
* Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_elf32.c,v 1.7 2002/11/19 22:38:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_elf32.c,v 1.8 2002/11/28 15:08:36 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,20 +69,18 @@
static const char wantBrand[] = FREEBSD_ELF_BRAND_STRING;
static const char wantInterp[] = FREEBSD_ELF_INTERP_PREFIX_STRING;
+ /*
+ * Insist that the executable have a brand, and that it be "FreeBSD".
+ * Newer FreeBSD binaries have OSABI set to ELFOSABI_FREEBSD. This
+ * is arguably broken, but they seem to think they need it, for
+ * whatever reason.
+ */
#ifndef EI_BRAND
#define EI_BRAND 8
#endif
- /*
- * If a binary has a brand, make sure that it is "FreeBSD".
- * Newer FreeBSD binaries have OSABI set to ELFOSABI_FREEBSD. This
- * is arguably broken, but they seem to think they need it, for
- * whatever reason. If the OSABI field is set, insist that it is
- * ELFOSABI_FREEBSD.
- */
- if ((eh->e_ident[EI_BRAND] != '\0' &&
- strcmp(&eh->e_ident[EI_BRAND], wantBrand) != 0) ||
- (eh->e_ident[EI_OSABI] != 0 &&
- eh->e_ident[EI_OSABI] != ELFOSABI_FREEBSD))
+ if ((eh->e_ident[EI_BRAND] == '\0'
+ || strcmp(&eh->e_ident[EI_BRAND], wantBrand) != 0)
+ && eh->e_ident[EI_OSABI] != ELFOSABI_FREEBSD)
return ENOEXEC;
i = eh->e_phnum;
Home |
Main Index |
Thread Index |
Old Index