Kris Katterjohn wrote:
> The attached patch removes environ declarations in main.cc and
> nmapfe/nmapfe_sig.c and uses execv() instead of execve(,,environ).
>
> environ isn't used in nmapfe/* and the declaration in main.cc only seems
> to be there for the execve().
>
> It's a diff against 4.20ALPHA10
>
> Thanks,
> Kris Katterjohn
>
I guess I forgot to attach the patch.
Kris
--- x/main.cc 2006-09-30 03:35:13.000000000 -0500
+++ y/main.cc 2006-10-29 18:42:16.000000000 -0600
@@ -136,7 +136,6 @@ static BOOL OpenLibs(void) {
/* global options */
extern NmapOps o; /* option structure */
-extern char **environ;
int main(int argc, char *argv[]) {
/* The "real" main is nmap_main(). This function hijacks control at the
@@ -390,7 +389,7 @@ int main(int argc, char *argv[]) {
}
/* OK, I think we are finally ready for the big exec() */
- ret = execve(nmappath, fakeargv, environ);
+ ret = execv(nmappath, fakeargv);
if (ret == -1) {
pfatal("Could not exec %s", nmappath);
}
--- x/nmapfe/nmapfe_sig.c 2006-10-13 20:26:52.000000000 -0500
+++ y/nmapfe/nmapfe_sig.c 2006-10-29 18:42:28.000000000 -0600
@@ -167,7 +167,6 @@ HANDLE pipes[2]; /* 0 == read; 1 == writ
int pipes[2] = {-1,-1};
#endif
int verb = 0;
-extern char **environ;
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Received on Oct 29 2006