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

[tor-commits] [ooni-probe/master] Launch tor as the user that started ooniprobe.



commit f832c80b1cc21f06a0eef914116c22f4188d61b0
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Fri Aug 8 17:22:53 2014 +0200

    Launch tor as the user that started ooniprobe.
---
 ooni/director.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ooni/director.py b/ooni/director.py
index 18b7cb2..2245cad 100644
--- a/ooni/director.py
+++ b/ooni/director.py
@@ -1,3 +1,4 @@
+import pwd
 import os
 
 from ooni.managers import ReportEntryManager, MeasurementManager
@@ -363,6 +364,8 @@ class Director(object):
             for i in config.tor.torrc.keys():
                 setattr(tor_config, i, config.tor.torrc[i])
 
+        tor_config.User = pwd.getpwuid(os.geteuid()).pw_name
+
         tor_config.save()
 
         if not hasattr(tor_config, 'ControlPort'):



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