Module Name: src
Committed By: christos
Date: Tue Nov 7 20:58:23 UTC 2017
Modified Files:
src/sys/kern: kern_exec.c
Log Message:
hack around namei problem.
To generate a diff of this commit:
cvs rdiff -u -r1.450 -r1.451 src/sys/kern/kern_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.450 src/sys/kern/kern_exec.c:1.451
--- src/sys/kern/kern_exec.c:1.450 Tue Nov 7 14:44:04 2017
+++ src/sys/kern/kern_exec.c Tue Nov 7 15:58:23 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.450 2017/11/07 19:44:04 christos Exp $ */
+/* $NetBSD: kern_exec.c,v 1.451 2017/11/07 20:58:23 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.450 2017/11/07 19:44:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.451 2017/11/07 20:58:23 christos Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -1154,7 +1154,9 @@ execve_runproc(struct lwp *l, struct exe
if (error != 0)
goto exec_abort;
- pathexec(p, epp->ep_resolvedname);
+ // XXX: Can't use epp->ep_resolvedname since namei can return
+ // a relative path in pnbuf when being passed an absolute path!
+ pathexec(p, data->ed_pathstring);
char * const newstack = STACK_GROW(vm->vm_minsaddr, epp->ep_ssize);