remove dthe clearenv stuff, not sure why its there. s/setenv/putenv/ for
authorNot Zed <NotZed@Ximian.com>
Wed, 10 Dec 2003 02:02:09 +0000 (02:02 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Wed, 10 Dec 2003 02:02:09 +0000 (02:02 +0000)
2003-12-10  Not Zed  <NotZed@Ximian.com>

        * camel-stream-process.c (do_exec_command): remove dthe clearenv
        stuff, not sure why its there.  s/setenv/putenv/ for portability.
        See Bug #51767.

camel/ChangeLog
camel/camel-stream-process.c

index 00df1f6..9f02d6f 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-10  Not Zed  <NotZed@Ximian.com>
+
+       * camel-stream-process.c (do_exec_command): remove dthe clearenv
+       stuff, not sure why its there.  s/setenv/putenv/ for portability.
+       See Bug #51767.
+
 2003-12-08  Jeffrey Stedfast  <fejj@ximian.com>
 
        * camel-mime-utils.c (header_decode_rfc2184_param): Revert the
index 6a48ae4..293cd2b 100644 (file)
@@ -33,6 +33,7 @@
 #include <sys/wait.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <errno.h>
 #include <limits.h>
 #include <stdio.h>
@@ -224,18 +225,8 @@ do_exec_command (int fd, const char *command, char **env)
        
        /* Set up child's environment. We _add_ to it, don't use execle, 
           because otherwise we'd destroy stuff like SSH_AUTH_SOCK etc. */
-       for ( ; env && *env; env++) {
-               char *eq = strchr (*env, '=');
-               
-               if (!eq) {
-                       unsetenv (*env);
-                       continue;
-               }
-               
-               *eq++ = '\0';
-               
-               setenv (*env, eq, 1);
-       }
+       for ( ; env && *env; env++)
+               putenv(*env);
        
        execl ("/bin/sh", "/bin/sh", "-c", command, NULL);