From owner-freebsd-emulation Sat Jun 12 13:24: 0 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (Postfix) with ESMTP id 580BE14BFA for ; Sat, 12 Jun 1999 13:23:57 -0700 (PDT) (envelope-from freebsd-emulation@scc.nl) Received: from scones.sup.scc.nl (i258.ztm.euronet.nl [194.134.67.59]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id WAA04507 from for ; Sat, 12 Jun 1999 22:23:50 +0200 (MET DST) Received: (from daemon@localhost) by scones.sup.scc.nl (8.9.3/8.9.3) id WAA34650 for emulation@FreeBSD.ORG; Sat, 12 Jun 1999 22:07:56 +0200 (CEST) (envelope-from freebsd-emulation@scc.nl) Received: from GATEWAY by scones.sup.scc.nl with netnews for emulation@FreeBSD.ORG (emulation@FreeBSD.ORG) To: emulation@FreeBSD.ORG Date: Sat, 12 Jun 1999 22:07:55 +0200 From: Marcel Moolenaar Message-ID: <3762BE1B.24EE2D48@scc.nl> Organization: SCC vof Content-Type: multipart/mixed; References: <199906120956.LAA13361@freebsd.dk>, <37627BEA.9687CA5@scc.nl> Subject: Re: Bug in linux fcntl syscall? (DUH) Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------B1CA2654AC2CA165CC62B905 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Marcel Moolenaar wrote: [see previous post] Here's the patchfile corresponding to (A) -- Marcel Moolenaar mailto:marcel@scc.nl SCC Internetworking & Databases http://www.scc.nl/ Amsterdam, The Netherlands tel: +31 20 4200655 --------------B1CA2654AC2CA165CC62B905 Content-Type: text/plain; charset=us-ascii; name="linux.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="linux.patch" --- ./sys/i386/linux/linux_misc.c.orig Sat Jun 12 12:55:46 1999 +++ ./sys/i386/linux/linux_misc.c Sat Jun 12 13:08:02 1999 @@ -868,11 +868,11 @@ printf("Linux-emul(%d): newuname(*)\n", p->p_pid); #endif bzero(&linux_newuname, sizeof(struct linux_newuname_t)); - strncpy(linux_newuname.sysname, ostype, + strncpy(linux_newuname.sysname, "Linux", sizeof(linux_newuname.sysname) - 1); strncpy(linux_newuname.nodename, hostname, sizeof(linux_newuname.nodename) - 1); - strncpy(linux_newuname.release, osrelease, + strncpy(linux_newuname.release, "2.0.36", sizeof(linux_newuname.release) - 1); strncpy(linux_newuname.version, version, sizeof(linux_newuname.version) - 1); --- ./sys/kern/imgact_elf.c.orig Sat Jun 12 12:55:51 1999 +++ ./sys/kern/imgact_elf.c Sat Jun 12 13:12:10 1999 @@ -436,7 +436,8 @@ /* * Do we have a valid ELF header ? */ - if (elf_check_header(hdr) != 0 || hdr->e_type != ET_EXEC) + if (elf_check_header(hdr) != 0 || + (hdr->e_type != ET_EXEC && hdr->e_type != ET_REL)) return -1; /* @@ -584,12 +585,15 @@ imgp->proc->p_sysent = brand_info->sysvec; if (interp != NULL) { - snprintf(path, sizeof(path), "%s%s", - brand_info->emul_path, interp); + snprintf(path, sizeof(path), "%s%s", + brand_info->emul_path, interp); if ((error = elf_load_file(imgp->proc, path, &addr, - &imgp->entry_addr)) != 0) { - uprintf("ELF interpreter %s not found\n", path); - goto fail; + &imgp->entry_addr)) != 0) { + if ((error = elf_load_file(imgp->proc, interp, &addr, + &imgp->entry_addr)) != 0) { + uprintf("ELF interpreter %s not found\n", path); + goto fail; + } } } --------------B1CA2654AC2CA165CC62B905-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message