[CalendarServer-changes] [1145]
CalendarServer/branches/users/dreid/pid-removal-2
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 7 10:59:37 PST 2007
Revision: 1145
http://trac.macosforge.org/projects/calendarserver/changeset/1145
Author: dreid at apple.com
Date: 2007-02-07 10:59:37 -0800 (Wed, 07 Feb 2007)
Log Message:
-----------
Do not have launchd tell us who to drop privileges as, this is now in the config file, properly check if we're root. and default to pidfile at /var/run/caldavd.pid
Modified Paths:
--------------
CalendarServer/branches/users/dreid/pid-removal-2/conf/caldavd.plist
CalendarServer/branches/users/dreid/pid-removal-2/conf/launchd.plist
CalendarServer/branches/users/dreid/pid-removal-2/twistedcaldav/tap.py
Modified: CalendarServer/branches/users/dreid/pid-removal-2/conf/caldavd.plist
===================================================================
--- CalendarServer/branches/users/dreid/pid-removal-2/conf/caldavd.plist 2007-02-07 03:49:03 UTC (rev 1144)
+++ CalendarServer/branches/users/dreid/pid-removal-2/conf/caldavd.plist 2007-02-07 18:59:37 UTC (rev 1145)
@@ -70,7 +70,7 @@
<string>/var/log/caldavd/error.log</string>
<key>PIDFile</key>
- <string>/var/log/caldavd/caldavd.pid</string>
+ <string>/var/run/caldavd.pid</string>
<!-- XML File Directory Service -->
<!--
Modified: CalendarServer/branches/users/dreid/pid-removal-2/conf/launchd.plist
===================================================================
--- CalendarServer/branches/users/dreid/pid-removal-2/conf/launchd.plist 2007-02-07 03:49:03 UTC (rev 1144)
+++ CalendarServer/branches/users/dreid/pid-removal-2/conf/launchd.plist 2007-02-07 18:59:37 UTC (rev 1145)
@@ -30,10 +30,6 @@
<array>
<string>/usr/sbin/caldavd</string>
<string>-X</string>
- <string>-u</string>
- <string>calendar</string>
- <string>-g</string>
- <string>calendar</string>
</array>
<key>InitGroups</key>
Modified: CalendarServer/branches/users/dreid/pid-removal-2/twistedcaldav/tap.py
===================================================================
--- CalendarServer/branches/users/dreid/pid-removal-2/twistedcaldav/tap.py 2007-02-07 03:49:03 UTC (rev 1144)
+++ CalendarServer/branches/users/dreid/pid-removal-2/twistedcaldav/tap.py 2007-02-07 18:59:37 UTC (rev 1145)
@@ -136,14 +136,14 @@
self.parent['gid'])
if uid:
- if uid != os.getuid() and uid != 0:
+ if uid != os.getuid() and os.getuid() != 0:
import pwd
username = pwd.getpwuid(os.getuid())[0]
raise UsageError(("Only root can drop privileges "
- "you are: %s" % (username,)))
+ "you are: %r" % (username,)))
if gid:
- if gid != os.getgid() and gid != 0:
+ if gid != os.getgid() and os.getgid() != 0:
import grp
groupname = grp.getgrgid(os.getuid())[0]
raise UsageError(("Only root can drop privileges, "
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070207/67c3c42d/attachment.html
More information about the calendarserver-changes
mailing list