[CalendarServer] #335: Search via email address in cachingappleopendirectory fails
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Using trunk/head, with users in opendirectory, ldap set to /127.0.0.1 instead of /Search, with iCal from 10.5.6, if I connect as user 'dave', and create an event inviting user 'sarah@test.com', iCal will auto- complete the name fine and pass the email address to DCS. However, in the case where the cache misses (user sarah hasn't connected since the server was last started), it does an OD search for sarah@test.com, which fails to find the user (there is a user with that address in emailaddress, verified both with a DS dumping tool I wrote and in Directory.app). However, if I first make sure that user sarah has connected, then her info gets loaded into the cache, and she is properly invited to the event. -- Ticket URL: <http://trac.calendarserver.org/ticket/335> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Comment(by ebach2@…): Adding debug log of event -- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:1> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Comment(by ebach2@…): Replying to [comment:1 ebach2@…]:
Adding debug log of event
To follow up, in cachingappleopendirectory.OpenDirectoryService.queryDirectory(), it catches an exception from the query: except opendirectory.ODError, ex: if ex.message[1] == -14140 or ex.message[1] == -14200: # Unsupported attribute on record - don't fail [I added this debug line] self.log_debug("opendirectory.queryDirectory unsupported attribute on record - don't fail %s" % (ex.message[1],)) return When I re-rerun everything, this logs: 2009-04-26 13:35:45-0700 [-] [caldav-8010] [-] [twistedcaldav.directory.cachingappleopendirectory.OpenDirectoryService#debug] opendirectory.queryDirectory unsupported attribute on record - don't fail -14200 -- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:2> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Comment(by ebach2@…): To follow up, it also fails even when using /Search for the ldap node. But within the dscl cli tool, the search for the email address succeeds:
search /Search dsAttrTypeNative:mail sarah@test.com Users/sarah dsAttrTypeNative:mail = ( "sarah@test.com" )
-- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:3> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Comment(by ebach2@…): Replying to [comment:3 ebach2@…]:
To follow up, it also fails even when using /Search for the ldap node.
But within the dscl cli tool, the search for the email address succeeds:
search /Search dsAttrTypeNative:mail sarah@test.com Users/sarah dsAttrTypeNative:mail = ( "sarah@test.com" )
I'm not sure why, but: search /Search dsAttrTypeStandard:EMailAddress sarah@test.com returns no entries (where searching for dsAttrTypeNative:mail returns the proper record) But my DirectoryServices exploring app (which just does a dsGetRecordEntry, then iterates over all the attributes for the record), returns both dsAttrTypeNative:mail and dsAttrTypeStandard:EMailAddress entries, which the dscl tool doesn't display. And I've verified in DirectoryUtility.app that EMailAddress is mapped by the mail ldap attribute. -- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:5> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Comment(by ebach2@…): ... And doing read /Search/Users/Sarah shows both dsAttrTypeNative:mail: sarah@test.com EMailAddress: sarah@test.com and search /Search EMailAddress sarah@test.com also returns no results and the wiki seems to strip off the 'test.com' from everywhere that you would expect the email address to be in the search commands -- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:6> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails ------------------------------+--------------------------------------------- Reporter: ebach2@… | Owner: sagen@… Type: Defect | Status: new Priority: 1: Blocker | Milestone: Component: Calendar Server | Severity: Serious Keywords: | ------------------------------+--------------------------------------------- Changes (by sagen@…): * owner: wsanchez@… => sagen@… Comment: Thanks for looking into this. What I found was that our pyopendirectory queries are coming back empty when we do a search on email address and ask for users, groups, resource, and locations. If we only look for users and groups, the query works. I have updated trunk with this workaround. -- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:7> CalendarServer </> HTTP/WebDAV/CalDAV Server
#335: Search via email address in cachingappleopendirectory fails -------------------------------+-------------------------------------------- Reporter: ebach2@… | Owner: sagen@… Type: Defect | Status: closed Priority: 1: Blocker | Milestone: CalendarServer-2.2 Component: Calendar Server | Severity: Serious Resolution: Software changed | Keywords: -------------------------------+-------------------------------------------- Changes (by wsanchez@…): * status: new => closed * resolution: => Software changed * milestone: => CalendarServer-2.2 Comment: Should be all set now -- Ticket URL: <http://trac.calendarserver.org/ticket/335#comment:8> CalendarServer </> HTTP/WebDAV/CalDAV Server
participants (1)
-
CalendarServer