[CalendarServer-changes] [9834] CalendarServer/trunk/calendarserver/tap

source_changes at macosforge.org source_changes at macosforge.org
Fri Sep 21 22:48:32 PDT 2012


Revision: 9834
          http://trac.calendarserver.org//changeset/9834
Author:   glyph at apple.com
Date:     2012-09-21 22:48:32 -0700 (Fri, 21 Sep 2012)
Log Message:
-----------
Copy configured umask to twistd option, to make sure it is consistently honored.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tap/caldav.py
    CalendarServer/trunk/calendarserver/tap/test/test_caldav.py

Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py	2012-09-22 01:08:58 UTC (rev 9833)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py	2012-09-22 05:48:32 UTC (rev 9834)
@@ -449,6 +449,7 @@
         if oldmask != config.umask:
             self.log_info("WARNING: changing umask from: 0%03o to 0%03o"
                           % (oldmask, config.umask))
+        self.parent['umask'] = config.umask
 
 
 

Modified: CalendarServer/trunk/calendarserver/tap/test/test_caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/test/test_caldav.py	2012-09-22 01:08:58 UTC (rev 9833)
+++ CalendarServer/trunk/calendarserver/tap/test/test_caldav.py	2012-09-22 05:48:32 UTC (rev 9834)
@@ -230,12 +230,17 @@
         argv = [
             "-f", myConfigFile,
             "-o", "PIDFile=/dev/null",
+            "-o", "umask=63",
+            # integers in plists & calendarserver command line are always
+            # decimal; umask is traditionally in octal.
         ]
 
         self.config.parseOptions(argv)
 
         self.assertEquals(self.config.parent["pidfile"], "/dev/null")
+        self.assertEquals(self.config.parent["umask"], 0077)
 
+
     def test_specifyConfigFile(self):
         """
         Test that specifying a config file from the command line
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120921/536a6192/attachment.html>


More information about the calendarserver-changes mailing list