s4-server: avoid using environ as it is not portable
authorAndrew Tridgell <tridge@samba.org>
Sun, 31 Oct 2010 22:47:12 +0000 (09:47 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 31 Oct 2010 23:53:49 +0000 (23:53 +0000)
we can just use execv() instead, which passes through the environment,
which is all we need

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Oct 31 23:53:49 UTC 2010 on sn-devel-104

source4/smb_server/smb_samba3.c

index df85bcf90010c04d33621ab88a689e30c7577da6..ee12480c39fb5ff12091da1f94d6bd250e3d5bcf 100644 (file)
@@ -39,7 +39,6 @@ static void samba3_smb_accept(struct stream_connection *conn)
        const char *prog;
        char *argv[2];
        char *reason;
-       extern char **environ;
 
        close(0);
        close(1);
@@ -65,7 +64,7 @@ static void samba3_smb_accept(struct stream_connection *conn)
        }
        argv[1] = NULL;
 
-       execve(argv[0], argv, environ);
+       execv(argv[0], argv);
 
        /*
         * Should never get here