mirror of
https://github.com/nmap/nmap.git
synced 2026-08-28 12:31:12 +00:00
Allow environment variable NMAP_UNPRIVILEGED to be equivalent to --unprivileged as NMAP_PRIVILEGED is to --privileged.
This commit is contained in:
parent
889a40a1e1
commit
4d190f3751
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue