[CalendarServer-changes] [4375] CalendarServer/trunk/calendarserver/tools/principals.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 24 11:38:32 PDT 2009
Revision: 4375
http://trac.macosforge.org/projects/calendarserver/changeset/4375
Author: wsanchez at apple.com
Date: 2009-06-24 11:38:32 -0700 (Wed, 24 Jun 2009)
Log Message:
-----------
Don't try to switchUID if you aren't root.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/principals.py
Modified: CalendarServer/trunk/calendarserver/tools/principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/principals.py 2009-06-24 18:25:27 UTC (rev 4374)
+++ CalendarServer/trunk/calendarserver/tools/principals.py 2009-06-24 18:38:32 UTC (rev 4375)
@@ -195,7 +195,7 @@
setLogLevelForNamespace(None, "warn")
# Shed privileges
- if config.UserName and config.GroupName:
+ if config.UserName and config.GroupName and os.getuid() == 0:
uid = getpwnam(config.UserName).pw_uid
gid = getgrnam(config.GroupName).gr_gid
switchUID(uid, uid, gid)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090624/01610369/attachment.html>
More information about the calendarserver-changes
mailing list