linux32_sysvec.c (177145) | linux32_sysvec.c (177997) |
---|---|
1/*- 2 * Copyright (c) 2004 Tim J. Robbins 3 * Copyright (c) 2003 Peter Wemm 4 * Copyright (c) 2002 Doug Rabson 5 * Copyright (c) 1998-1999 Andrew Gallatin 6 * Copyright (c) 1994-1996 S�ren Schmidt 7 * All rights reserved. 8 * --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Tim J. Robbins 3 * Copyright (c) 2003 Peter Wemm 4 * Copyright (c) 2002 Doug Rabson 5 * Copyright (c) 1998-1999 Andrew Gallatin 6 * Copyright (c) 1994-1996 S�ren Schmidt 7 * All rights reserved. 8 * --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/amd64/linux32/linux32_sysvec.c 177145 2008-03-13 10:54:38Z kib $"); | 34__FBSDID("$FreeBSD: head/sys/amd64/linux32/linux32_sysvec.c 177997 2008-04-08 09:45:49Z kib $"); |
35#include "opt_compat.h" 36 37#ifndef COMPAT_IA32 38#error "Unable to compile Linux-emulator due to missing COMPAT_IA32 option!" 39#endif 40 41#define __ELF_WORD_SIZE 32 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/exec.h> | 35#include "opt_compat.h" 36 37#ifndef COMPAT_IA32 38#error "Unable to compile Linux-emulator due to missing COMPAT_IA32 option!" 39#endif 40 41#define __ELF_WORD_SIZE 32 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/exec.h> |
46#include <sys/fcntl.h> |
|
46#include <sys/imgact.h> 47#include <sys/imgact_elf.h> 48#include <sys/kernel.h> 49#include <sys/lock.h> 50#include <sys/malloc.h> 51#include <sys/module.h> 52#include <sys/mutex.h> 53#include <sys/proc.h> --- 729 unchanged lines hidden (view full) --- 783 if (((const short *)head)[0] == SHELLMAGIC) { 784 /* 785 * Run our normal shell image activator. If it succeeds attempt 786 * to use the alternate path for the interpreter. If an alternate 787 * path is found, use our stringspace to store it. 788 */ 789 if ((error = exec_shell_imgact(imgp)) == 0) { 790 linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), | 47#include <sys/imgact.h> 48#include <sys/imgact_elf.h> 49#include <sys/kernel.h> 50#include <sys/lock.h> 51#include <sys/malloc.h> 52#include <sys/module.h> 53#include <sys/mutex.h> 54#include <sys/proc.h> --- 729 unchanged lines hidden (view full) --- 784 if (((const short *)head)[0] == SHELLMAGIC) { 785 /* 786 * Run our normal shell image activator. If it succeeds attempt 787 * to use the alternate path for the interpreter. If an alternate 788 * path is found, use our stringspace to store it. 789 */ 790 if ((error = exec_shell_imgact(imgp)) == 0) { 791 linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), |
791 imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0); | 792 imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD); |
792 if (rpath != NULL) { 793 len = strlen(rpath) + 1; 794 795 if (len <= MAXSHELLCMDLEN) { 796 memcpy(imgp->interpreter_name, rpath, len); 797 } 798 free(rpath, M_TEMP); 799 } --- 335 unchanged lines hidden --- | 793 if (rpath != NULL) { 794 len = strlen(rpath) + 1; 795 796 if (len <= MAXSHELLCMDLEN) { 797 memcpy(imgp->interpreter_name, rpath, len); 798 } 799 free(rpath, M_TEMP); 800 } --- 335 unchanged lines hidden --- |