From 665b0950c66e34f687ec2e6f02021b57499daead Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 21 May 2004 11:19:30 +0000 Subject: 19971: Fix environment nastiness in zexecve() --- Src/exec.c | 7 +------ Src/params.c | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 1bc461ffa..fe1415845 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -352,18 +352,13 @@ zexecve(char *pth, char **argv) for (eep = argv; *eep; eep++) if (*eep != pth) unmetafy(*eep, NULL); - for (eep = environ; *eep; eep++) - if (**eep == '_' && (*eep)[1] == '=') - break; buf[0] = '_'; buf[1] = '='; if (*pth == '/') strcpy(buf + 2, pth); else sprintf(buf + 2, "%s/%s", pwd, pth); - if (!*eep) - eep[1] = NULL; - *eep = buf; + zputenv(buf); closedumps(); execve(pth, argv, environ); diff --git a/Src/params.c b/Src/params.c index 26ff2c566..4f1d08b92 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3297,7 +3297,8 @@ arrfixenv(char *s, char **t) } -static int +/**/ +int zputenv(char *str) { #ifdef HAVE_PUTENV -- cgit 1.4.1