--- App.py_2011-12-14_15.16.44	2011-12-14 15:16:44.000000000 +0000
+++ App.py	2013-01-24 13:08:41.510661520 +0000
@@ -163,7 +163,12 @@
             or imp.is_frozen("__main__")) # tools/freeze
 
 def is_root():
-    return sys.platform == "win32" or os.getuid() == 0 or is_maemo()
+    if 'NMAP_PRIVILEGED' in os.environ:
+        return True
+    elif 'NMAP_UNPRIVILEGED' in os.environ:
+        return False
+    else:
+        return sys.platform == "win32" or os.getuid() == 0 or is_maemo()
 
 def install_excepthook():
     # This will catch exceptions and send them to bugzilla
