[CalendarServer-changes] [7853] CalendarServer/trunk/twistedcaldav/directory
source_changes at macosforge.org
source_changes at macosforge.org
Tue Aug 2 10:03:22 PDT 2011
Revision: 7853
http://trac.macosforge.org/projects/calendarserver/changeset/7853
Author: sagen at apple.com
Date: 2011-08-02 10:03:22 -0700 (Tue, 02 Aug 2011)
Log Message:
-----------
better ldap logging
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/directory.py
CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
Modified: CalendarServer/trunk/twistedcaldav/directory/directory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/directory.py 2011-08-02 06:19:23 UTC (rev 7852)
+++ CalendarServer/trunk/twistedcaldav/directory/directory.py 2011-08-02 17:03:22 UTC (rev 7853)
@@ -534,6 +534,7 @@
# We're in quick-start mode. Check first to see if someone has
# populated the membership cache, and if so, return immediately
if isPopulated:
+ self.log_debug("Group membership cache is already populated")
returnValue((fast, 0))
# We don't care what others are doing right now, we need to update
Modified: CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2011-08-02 06:19:23 UTC (rev 7852)
+++ CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2011-08-02 17:03:22 UTC (rev 7853)
@@ -539,11 +539,14 @@
uid = None
enabledForLogin = True
+ shortNames = (self._getUniqueLdapAttribute(attrs, self.rdnSchema[recordType]["mapping"]["recordName"]),)
+
# First check for and add guid
guidAttr = self.rdnSchema["guidAttr"]
if guidAttr:
guid = self._getUniqueLdapAttribute(attrs, guidAttr)
if not guid:
+ self.log_info("LDAP data for %s is missing guid attribute %s" % (shortNames, guidAttr))
raise MissingGuidException()
# Find or build email
@@ -561,7 +564,6 @@
memberGUIDs = set()
# LDAP attribute -> principal matchings
- shortNames = (self._getUniqueLdapAttribute(attrs, self.rdnSchema[recordType]["mapping"]["recordName"]),)
if recordType == self.recordType_users:
fullName = self._getUniqueLdapAttribute(attrs, self.rdnSchema[recordType]["mapping"]["fullName"])
firstName = self._getUniqueLdapAttribute(attrs, self.rdnSchema[recordType]["mapping"]["firstName"])
@@ -786,8 +788,8 @@
record.applySACLs()
except MissingGuidException:
- self.log_warn("LDAP data missing required GUID attribute: %s" %
- (guidAttr,))
+ self.log_warn("Ignoring record missing guid attribute: recordType %s, indexType %s and indexKey %s"
+ % (recordTypes, indexType, indexKey))
def recordsMatchingFields(self, fields, operand="or", recordType=None):
"""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110802/1addcf04/attachment.html>
More information about the calendarserver-changes
mailing list