[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Don't ask for root if we have the power



commit d707f5ab5b9c4abe129430297459d28477880d7a
Author: aagbsn <aagbsn@xxxxxxxx>
Date:   Mon Feb 18 02:23:49 2013 +0100

    Don't ask for root if we have the power
---
 ooni/templates/scapyt.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ooni/templates/scapyt.py b/ooni/templates/scapyt.py
index 5f6c7c8..fab492c 100644
--- a/ooni/templates/scapyt.py
+++ b/ooni/templates/scapyt.py
@@ -11,6 +11,7 @@ from ooni.utils import log
 from ooni import config
 
 from ooni.utils.txscapy import ScapySender, getDefaultIface, ScapyFactory
+from ooni.utils.txscapy import hasRawSocketPermission
 
 class BaseScapyTest(NetTestCase):
     """
@@ -26,7 +27,7 @@ class BaseScapyTest(NetTestCase):
     name = "Base Scapy Test"
     version = 0.1
 
-    requiresRoot = True
+    requiresRoot = not hasRawSocketPermission()
     baseFlags = [
             ['ipsrc', 's',
                 'Does *not* check if IP src and ICMP IP citation matches when processing answers'],



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits