]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/ldap.c
striplt() is now string_trim()
[citadel.git] / citadel / server / ldap.c
index 3a16117cdbbe1ba1314d7b84c903dee60b188e58..21624ad9d614759ee1f26f8dc146ddc9bc9d513a 100644 (file)
@@ -3,13 +3,8 @@
 //
 // Copyright (c) 2011-2022 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.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
 
 // ldapsearch -D uid=admin,cn=users,cn=compat,dc=demo1,dc=freeipa,dc=org -w Secret123 -h ipa.demo1.freeipa.org
 
@@ -131,8 +126,8 @@ LDAP *ctdl_ldap_bind(void) {
        ldap_set_option(ldserver, LDAP_OPT_PROTOCOL_VERSION, &ctdl_require_ldap_version);
        ldap_set_option(ldserver, LDAP_OPT_REFERRALS, (void *)LDAP_OPT_OFF);
 
-       striplt(CtdlGetConfigStr("c_ldap_bind_dn"));
-       striplt(CtdlGetConfigStr("c_ldap_bind_pw"));
+       string_trim(CtdlGetConfigStr("c_ldap_bind_dn"));
+       string_trim(CtdlGetConfigStr("c_ldap_bind_pw"));
        i = ldap_simple_bind_s(ldserver,
                (!IsEmptyStr(CtdlGetConfigStr("c_ldap_bind_dn")) ? CtdlGetConfigStr("c_ldap_bind_dn") : NULL),
                (!IsEmptyStr(CtdlGetConfigStr("c_ldap_bind_pw")) ? CtdlGetConfigStr("c_ldap_bind_pw") : NULL)