Allow environment variable NMAP_UNPRIVILEGED to be equivalent to --unprivileged as NMAP_PRIVILEGED is to --privileged.

This commit is contained in:
kris 2007-01-12 02:31:47 +00:00
parent 889a40a1e1
commit 4d190f3751

View file

@ -182,6 +182,8 @@ void NmapOps::Initialize() {
#else
if (getenv("NMAP_PRIVILEGED"))
isr00t = 1;
else if (getenv("NMAP_UNPRIVILEGED"))
isr00t = 0;
else
isr00t = !(geteuid());
#endif