[CalendarServer-changes] [5088] CalendarServer/branches/users/cdaboo/relative-config-paths-5070/ calendarserver/tap/caldav.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 10 13:02:58 PST 2010
Revision: 5088
http://trac.macosforge.org/projects/calendarserver/changeset/5088
Author: cdaboo at apple.com
Date: 2010-02-10 13:02:58 -0800 (Wed, 10 Feb 2010)
Log Message:
-----------
Need to validate other paths.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/relative-config-paths-5070/calendarserver/tap/caldav.py
Modified: CalendarServer/branches/users/cdaboo/relative-config-paths-5070/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/branches/users/cdaboo/relative-config-paths-5070/calendarserver/tap/caldav.py 2010-02-10 20:57:53 UTC (rev 5087)
+++ CalendarServer/branches/users/cdaboo/relative-config-paths-5070/calendarserver/tap/caldav.py 2010-02-10 21:02:58 UTC (rev 5088)
@@ -277,22 +277,48 @@
)
#
- # Verify that document root, data root actually exist
+ # Verify that other root paths are OK
#
- self.checkDirectory(
- config.DocumentRoot,
- "Document root",
- # Don't require write access because one might not allow editing on /
- access=os.R_OK,
- create=(0750, config.UserName, config.GroupName),
- )
- self.checkDirectory(
- config.DataRoot,
- "Data root",
- access=os.W_OK,
- create=(0750, config.UserName, config.GroupName),
- )
+ if config.DocumentRoot.startswith(config.ServerRoot + os.sep):
+ self.checkDirectory(
+ config.DocumentRoot,
+ "Document root",
+ # Don't require write access because one might not allow editing on /
+ access=os.R_OK,
+ create=(0750, config.UserName, config.GroupName),
+ )
+ if config.DataRoot.startswith(config.ServerRoot + os.sep):
+ self.checkDirectory(
+ config.DataRoot,
+ "Data root",
+ access=os.W_OK,
+ create=(0750, config.UserName, config.GroupName),
+ )
+ if config.ConfigRoot.startswith(config.ServerRoot + os.sep):
+ self.checkDirectory(
+ config.ConfigRoot,
+ "Config root",
+ access=os.W_OK,
+ create=(0750, config.UserName, config.GroupName),
+ )
+
+ if config.LogRoot.startswith(config.ServerRoot + os.sep):
+ self.checkDirectory(
+ config.LogRoot,
+ "Log root",
+ access=os.W_OK,
+ create=(0750, config.UserName, config.GroupName),
+ )
+
+ if config.RunRoot.startswith(config.ServerRoot + os.sep):
+ self.checkDirectory(
+ config.RunRoot,
+ "Run root",
+ access=os.W_OK,
+ create=(0750, config.UserName, config.GroupName),
+ )
+
#
# Nuke the file log observer's time format.
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100210/9a6ea778/attachment.html>
More information about the calendarserver-changes
mailing list