[Zope-Checkins] CVS: ZODB3/zdaemon - zdrun.py:1.10
Guido van Rossum
guido@python.org
Thu, 23 Jan 2003 16:24:41 -0500
Update of /cvs-repository/ZODB3/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv27559
Modified Files:
zdrun.py
Log Message:
Set umask to 022.
=== ZODB3/zdaemon/zdrun.py 1.9 => 1.10 ===
--- ZODB3/zdaemon/zdrun.py:1.9 Thu Jan 23 12:29:01 2003
+++ ZODB3/zdaemon/zdrun.py Thu Jan 23 16:24:39 2003
@@ -337,8 +337,9 @@
os.close(2)
sys.stderr = sys.__stderr__ = open("/dev/null", "w")
os.setsid()
+ os.umask(022) # Create no group/other writable files/directories
# XXX Stevens, in his Advanced Unix book, section 13.3 (page
- # 417) also recommends calling umask(0) and closing unused
+ # 417) recommends calling umask(0) and closing unused
# file descriptors. In his Network Programming book, he
# additionally recommends ignoring SIGHUP and forking again
# after the setsid() call, for obscure SVR4 reasons.