summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-02-10 08:07:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-02-10 08:07:21 +0000
commit312b63cab3976ffcb3290a469bbf55b90da4559e (patch)
treec245105e2e3e6c2682cb15f477fec70558a3286c /sys/compat/linux
parent46635a71c2421fe5bc67f03ee208a6a43ff7ea17 (diff)
branding support and freebsd elf
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_exec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c
index 5002aaa0acf..c14c75ebb0a 100644
--- a/sys/compat/linux/linux_exec.c
+++ b/sys/compat/linux/linux_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_exec.c,v 1.9 1999/01/11 05:12:12 millert Exp $ */
+/* $OpenBSD: linux_exec.c,v 1.10 1999/02/10 08:07:20 deraadt Exp $ */
/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */
/*
@@ -374,10 +374,14 @@ linux_elf_probe(p, epp, itp, pos, os)
u_long *pos;
u_int8_t *os;
{
- char *bp;
+ Elf32_Ehdr *eh = epp->ep_hdr;
+ char *bp, *brand;
int error;
size_t len;
+ brand = elf_check_brand(eh);
+ if (brand && strcmp(brand, "Linux"))
+ return (EINVAL);
if (itp[0]) {
if ((error = emul_find(p, NULL, linux_emul_path, itp, &bp, 0)))
return (error);