From: Art Cancro Date: Mon, 17 Mar 2014 00:15:27 +0000 (-0400) Subject: ldap.c mods submitted by Harry Coin for populating vCard from LDAP X-Git-Tag: v9.01~125^2~1 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=2230772b04f3b7c58dd02a820d8983c63d6370ca ldap.c mods submitted by Harry Coin for populating vCard from LDAP --- diff --git a/citadel/ldap.c b/citadel/ldap.c index 864ab4807..f5461f299 100644 --- a/citadel/ldap.c +++ b/citadel/ldap.c @@ -2,7 +2,7 @@ * These functions implement the portions of AUTHMODE_LDAP and AUTHMODE_LDAP_AD which * actually speak to the LDAP server. * - * Copyright (c) 2011 by Art Cancro and the citadel.org development team. + * Copyright (c) 2011-2014 by the citadel.org development team. * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 3. @@ -72,8 +72,8 @@ int CtdlTryUserLDAP(char *username, if (ldap_initialize(&ldserver, config.c_ldap_host)) { syslog(LOG_ALERT, "LDAP: Could not connect to %s:%d : %s\n", - config.c_ldap_host, config.c_ldap_port, - strerror(errno) + config.c_ldap_host, config.c_ldap_port, + strerror(errno) ); return(errno); } @@ -237,6 +237,39 @@ int CtdlTryPasswordLDAP(char *user_dn, const char *password) } +//return !0 iff property changed. +int vcard_set_props_iff_different(struct vCard *v,char *propname,int numvals, char **vals) { + int i; + char *oldval; + for(i=0;i