[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Gentoo lies about proc permisssions
commit 061db1fd6ee04136f627110a06aba9f2f1bd4346
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Thu Dec 11 07:34:50 2014 -0800
Gentoo lies about proc permisssions
Gentoo says we have read permissions. Great! Only one minor hiccup, we get
permission denied if we read it...
https://trac.torproject.org/projects/tor/ticket/13904#comment:19
---
stem/util/connection.py | 2 +-
test/integ/util/proc.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/stem/util/connection.py b/stem/util/connection.py
index feb1b34..1ee0ffb 100644
--- a/stem/util/connection.py
+++ b/stem/util/connection.py
@@ -274,7 +274,7 @@ def system_resolvers(system = None):
# proc resolution, by far, outperforms the others so defaults to this is able
- if stem.util.proc.is_available() and os.access('/proc/net/tcp', os.R_OK) and os.access('/proc/net/udp', os.R_OK):
+ if stem.util.proc.is_available() and os.access('/proc/net/tcp', os.R_OK) and os.access('/proc/net/udp', os.R_OK) and not stem.util.system.is_gentoo():
resolvers = [Resolver.PROC] + resolvers
return resolvers
diff --git a/test/integ/util/proc.py b/test/integ/util/proc.py
index 1047912..3fac9eb 100644
--- a/test/integ/util/proc.py
+++ b/test/integ/util/proc.py
@@ -8,7 +8,7 @@ import unittest
import test.runner
-from stem.util import proc
+from stem.util import proc, system
class TestProc(unittest.TestCase):
@@ -90,7 +90,7 @@ class TestProc(unittest.TestCase):
elif not test.runner.get_runner().is_ptraceable():
test.runner.skip(self, '(DisableDebuggerAttachment is set)')
return
- elif not os.access('/proc/net/tcp', os.R_OK) or not os.access('/proc/net/udp', os.R_OK):
+ elif not os.access('/proc/net/tcp', os.R_OK) or not os.access('/proc/net/udp', os.R_OK) or system.is_gentoo():
test.runner.skip(self, '(proc lacks read permissions)')
return
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits