LDAP: iCal autocomplete fix
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@461 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
83fc7db9e0
commit
69cc508651
|
@ -103,7 +103,7 @@ public class LdapConnection extends AbstractConnection {
|
||||||
"</dict>" +
|
"</dict>" +
|
||||||
"<key>https</key>" +
|
"<key>https</key>" +
|
||||||
"<dict>" +
|
"<dict>" +
|
||||||
"<key>enabled</key>" +
|
"<key>disabled</key>" +
|
||||||
"<false/>" +
|
"<false/>" +
|
||||||
"<key>port</key>" +
|
"<key>port</key>" +
|
||||||
"<integer>0</integer>" +
|
"<integer>0</integer>" +
|
||||||
|
@ -686,6 +686,15 @@ public class LdapConnection extends AbstractConnection {
|
||||||
if (needObjectClasses) {
|
if (needObjectClasses) {
|
||||||
ldapPerson.put("objectClass", PERSON_OBJECT_CLASSES);
|
ldapPerson.put("objectClass", PERSON_OBJECT_CLASSES);
|
||||||
}
|
}
|
||||||
|
if (session.getAlias().equals(ldapPerson.get("uid"))) {
|
||||||
|
if (returningAttributes.contains("uidnumber")) {
|
||||||
|
ldapPerson.put("uidnumber", userName);
|
||||||
|
}
|
||||||
|
if (returningAttributes.contains("apple-generateduid")) {
|
||||||
|
ldapPerson.put("apple-generateduid", userName);
|
||||||
|
ldapPerson.put("uid", userName);
|
||||||
|
}
|
||||||
|
}
|
||||||
DavGatewayTray.debug("LDAP_REQ_SEARCH " + currentMessageId + " send uid=" + ldapPerson.get("uid") + baseContext + " " + ldapPerson);
|
DavGatewayTray.debug("LDAP_REQ_SEARCH " + currentMessageId + " send uid=" + ldapPerson.get("uid") + baseContext + " " + ldapPerson);
|
||||||
sendEntry(currentMessageId, "uid=" + ldapPerson.get("uid") + baseContext, ldapPerson);
|
sendEntry(currentMessageId, "uid=" + ldapPerson.get("uid") + baseContext, ldapPerson);
|
||||||
}
|
}
|
||||||
|
@ -716,7 +725,7 @@ public class LdapConnection extends AbstractConnection {
|
||||||
|
|
||||||
protected String hostName() {
|
protected String hostName() {
|
||||||
try {
|
try {
|
||||||
return java.net.InetAddress.getLocalHost().getHostName();
|
return java.net.InetAddress.getLocalHost().getCanonicalHostName();
|
||||||
} catch (java.net.UnknownHostException ex) {
|
} catch (java.net.UnknownHostException ex) {
|
||||||
DavGatewayTray.debug("Couldn't get hostname");
|
DavGatewayTray.debug("Couldn't get hostname");
|
||||||
}
|
}
|
||||||
|
@ -748,7 +757,7 @@ public class LdapConnection extends AbstractConnection {
|
||||||
addIf(attributes, returningAttributes, "cn", hostName());
|
addIf(attributes, returningAttributes, "cn", hostName());
|
||||||
|
|
||||||
String dn = "cn=" + hostName() + ", " + COMPUTER_CONTEXT;
|
String dn = "cn=" + hostName() + ", " + COMPUTER_CONTEXT;
|
||||||
DavGatewayTray.debug("Sending computer context " + dn);
|
DavGatewayTray.debug("Sending computer context " + dn+" "+attributes);
|
||||||
|
|
||||||
sendEntry(currentMessageId, dn, attributes);
|
sendEntry(currentMessageId, dn, attributes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue