Nmap Development mailing list archives
Re: [PATCH] Remove references to environ
From: Kris Katterjohn <kjak () ispwest com>
Date: Sun, 29 Oct 2006 18:54:48 -0600
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
Current thread:
- [PATCH] Remove references to environ Kris Katterjohn (Oct 29)
- Re: [PATCH] Remove references to environ Kris Katterjohn (Oct 29)
- Re: [PATCH] Remove references to environ Fyodor (Nov 01)
- Re: [PATCH] Remove references to environ Kris Katterjohn (Oct 29)
