Also try to load the interpreter without prepending "emul_path". This allows
dynamicly linked binaries to run in a chroot'd environment with "emul_path" as the new root. The new behavior of loading interpreters is identical to the principle of overlaying. PR: 10145
This commit is contained in:
parent
ec32ddd693
commit
7a583b02b6
@ -26,7 +26,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: imgact_elf.c,v 1.57 1999/05/14 23:09:00 alc Exp $
|
||||
* $Id: imgact_elf.c,v 1.58 1999/05/17 00:53:38 alc Exp $
|
||||
*/
|
||||
|
||||
#include "opt_rlimit.h"
|
||||
@ -584,12 +584,16 @@ exec_elf_imgact(struct image_params *imgp)
|
||||
|
||||
imgp->proc->p_sysent = brand_info->sysvec;
|
||||
if (interp != NULL) {
|
||||
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;
|
||||
snprintf(path, sizeof(path), "%s%s",
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user