From nobody@hyperreal.com Thu Jan 2 09:15:49 1997 Received: by taz.hyperreal.com (8.8.3/V2.0) id JAA11061; Thu, 2 Jan 1997 09:15:49 -0800 (PST) Message-Id: <199701021715.JAA11061@taz.hyperreal.com> Date: Thu, 2 Jan 1997 09:15:49 -0800 (PST) From: Markus Gyger Reply-To: mgyger@itr.ch To: apbugs@hyperreal.com Subject: suexec uses unknown function setenv() X-Send-Pr-Version: 3.2 >Number: 71 >Category: os-hpux >Synopsis: suexec uses unknown function setenv() >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Jan 2 09:20:00 1997 >Last-Modified: Fri Jan 24 07:59:28 PST 1997 >Originator: mgyger@itr.ch >Organization: >Release: 1.2b4 >Environment: HP-UX 10.20, HP ANSI-C compiler 10.32.07 >Description: setenv() is not available on HP-UX, but POSIX putenv() is. >How-To-Repeat: >Fix: --- suexec.c.orig Fri Dec 27 23:21:23 1996 +++ suexec.c Wed Jan 1 20:50:34 1997 @@ -136,7 +136,9 @@ struct group *gr; /* group entry holder */ struct stat dir_info; /* directory info holder */ struct stat prg_info; /* program info holder */ - +#ifdef __hpux + static char PATH[] = "PATH=" SAFE_PATH; /* concatenate */ +#endif /* __hpux */ /* @@ -355,7 +357,11 @@ exit(119); } +#ifdef __hpux + if (putenv(PATH) != 0) { +#else /* __hpux */ if ((setenv("PATH", SAFE_PATH, 1)) != 0) { +#endif /* __hpux */ log_err("cannot reset environment PATH\n"); exit(120); } %0 >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Fri Jan 24 07:59:28 PST 1997 State-Changed-Why: Dupe of 71 and fixed. >Unformatted: