Date: Thu, 18 Feb 1999 03:25:50 -0800 (PST) From: marcel@scc.nl To: freebsd-gnats-submit@freebsd.org Subject: kern/10145: ELF interpreter loading in chrooted situations Message-ID: <19990218112550.122FF112CA@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 10145
>Category: kern
>Synopsis: ELF interpreter loading in chrooted situations
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 18 03:30:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Marcel Moolenaar
>Release: 3.1-STABLE
>Organization:
SCC
>Environment:
FreeBSD scones.sup.scc.nl 3.1-BETA FreeBSD 3.1-BETA #24: Thu Feb 18 11:39:49 CET 1999 marcel@scones.sup.scc.nl:/usr/src/sys/compile/SCONES i386
>Description:
Linux ELF interpreters, for example, are expected under /compat/linux.
Those binaries cannot be run in a chrooted environment (with the root
set to /compat/linux), because the interpreter cannot be found. The
patch allows the loading/running of ELF binaries in such cases.
>How-To-Repeat:
n/a
>Fix:
Index: imgact_elf.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/imgact_elf.c,v
retrieving revision 1.44.2.3
diff -c -r1.44.2.3 imgact_elf.c
*** imgact_elf.c 1999/02/08 18:58:36 1.44.2.3
--- imgact_elf.c 1999/02/18 11:17:47
***************
*** 565,572 ****
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;
}
}
--- 565,575 ----
brand_info->emul_path, interp);
if ((error = elf_load_file(imgp->proc, path, &addr,
&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;
! }
}
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990218112550.122FF112CA>
