Nmap Development mailing list archives

Patch to make Zenmap respect NMAP_PRIVILEGED environment variable


From: "Tyler J. Wagner" <tyler () tolaris com>
Date: Wed, 23 Jan 2013 14:51:20 +0000

Everyone,

I have configured nmap for unprivileged users:

setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap
chgrp adm /usr/bin/nmap
chmod 750 /usr/bin/nmap

And set NMAP_PRIVILEGED in .xsessionrc, inherited by all terminals and shells:

export NMAP_PRIVILEGED="yes"

I can now perform all nmap functions (as far as I can tell) as my normal
user. This even works with Zenmap. However, Zenmap still displays an
annoying warning on startup:

You are trying to run Zenmap with a non-root user! Some Nmap options need
root privileges to work.

The attached patch, written against Zenmap 6.0.0 as distributed in Ubuntu
12.10, fixes this. During startup, when Zenmap checks if the user is root,
is also checks if the environment variable is set.

Regards,
Tyler

-- 
"All that is necessary for the triumph of evil is that good men do
nothing."
   -- Attributed to Edmund Burke

Attachment: NMAP_PRIVILEGED.patch
Description:

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: