소스 검색

Create client data directories in mode 0700

This allows control sockets to work by default.

Fixes #21464.
teor 7 년 전
부모
커밋
5d98fae0db
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      lib/chutney/TorNet.py

+ 5 - 1
lib/chutney/TorNet.py

@@ -335,9 +335,13 @@ class LocalNodeBuilder(NodeBuilder):
 
     def _makeDataDir(self):
         """Create the data directory (with keys subdirectory) for this node.
+
+          448 is the decimal representation of the octal number 0700. Since
+          python2 only supports 0700 and python3 only supports 0o700, we can
+          use neither.
         """
         datadir = self._env['dir']
-        mkdir_p(os.path.join(datadir, 'keys'))
+        mkdir_p(os.path.join(datadir, 'keys'), 448)
 
     def _makeHiddenServiceDir(self):
         """Create the hidden service subdirectory for this node.