]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-pinstall-copy-env-20080728
authorJason Edgecombe <jacon@rampaginggeek.com>
Mon, 28 Jul 2008 13:17:41 +0000 (13:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 28 Jul 2008 13:17:41 +0000 (13:17 +0000)
LICENSE IPL10
FIXES 108449

copy environment to children

src/pinstall/install.c

index 6cb0f12238dcfb505b175991c2a8475f66292bc3..ade14507a201c1d0735447c1be0f9b83d660c6dd 100644 (file)
@@ -183,9 +183,6 @@ quickStrip(char *iname, char *oname, int ignored, int copy_only)
 {
     int pid;
     pid_t status;
-    static char *env[] = {
-       0,
-    };
     static char *strip[] = {
        "strip", 0, 0,
     };
@@ -204,7 +201,7 @@ quickStrip(char *iname, char *oname, int ignored, int copy_only)
     case 0:                    /* child        */
        copy[1] = iname;
        copy[2] = oname;
-       execve("/bin/cp", copy, env);
+       execv("/bin/cp", copy);
        perror("/bin/cp");
        exit(1);
 
@@ -249,7 +246,7 @@ quickStrip(char *iname, char *oname, int ignored, int copy_only)
 #else
 #define        STRIP_BIN       "/bin/strip"
 #endif
-       execve(STRIP_BIN, strip, env);
+       execv(STRIP_BIN, strip);
        perror(STRIP_BIN);
        exit(1);
 
@@ -275,9 +272,6 @@ static int
 quickStrip(char *iname, char *oname, int ignored, int copy_only)
 {
     int pid, status;
-    static char *env[] = {
-       0,
-    };
     static char *strip[] = {
        "strip", 0, 0,
     };
@@ -296,7 +290,7 @@ quickStrip(char *iname, char *oname, int ignored, int copy_only)
     case 0:                    /* child        */
        copy[1] = iname;
        copy[2] = oname;
-       execve("/bin/cp", copy, env);
+       execv("/bin/cp", copy);
        perror("/bin/cp");
        exit(1);
 
@@ -334,7 +328,7 @@ quickStrip(char *iname, char *oname, int ignored, int copy_only)
 
     case 0:                    /* child        */
        strip[1] = oname;
-       execve("/bin/strip", strip, env);
+       execv("/bin/strip", strip);
        perror("/bin/strip");
        exit(1);