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

isis at torproject.org isis at torproject.org
Tue Mar 12 00:32:30 UTC 2013


commit d707f5ab5b9c4abe129430297459d28477880d7a
Author: aagbsn <aagbsn at extc.org>
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'],





More information about the tor-commits mailing list