mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s4-server: avoid using environ as it is not portable
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
This commit is contained in:
@ -39,7 +39,6 @@ static void samba3_smb_accept(struct stream_connection *conn)
|
|||||||
const char *prog;
|
const char *prog;
|
||||||
char *argv[2];
|
char *argv[2];
|
||||||
char *reason;
|
char *reason;
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
close(0);
|
close(0);
|
||||||
close(1);
|
close(1);
|
||||||
@ -65,7 +64,7 @@ static void samba3_smb_accept(struct stream_connection *conn)
|
|||||||
}
|
}
|
||||||
argv[1] = NULL;
|
argv[1] = NULL;
|
||||||
|
|
||||||
execve(argv[0], argv, environ);
|
execv(argv[0], argv);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Should never get here
|
* Should never get here
|
||||||
|
Reference in New Issue
Block a user