s3:idmap_ldap: trim the " chars from the location string in idmap_ldap_alloc_init
authorMichael Adam <obnox@samba.org>
Fri, 20 Nov 2009 11:38:44 +0000 (12:38 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 23 Nov 2009 08:02:39 +0000 (09:02 +0100)
When idmap alloc backend is specified as
idmap alloc backend = ldap:"ldap://server1 ldap://server2"
then currently "ldap://server1 ldap://server2" was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael

source3/winbindd/idmap_ldap.c

index 3d1dd488d6bb11b55513659a2e2d0d1bf9454f66..eba030c07c06cd6cf0aa1c97ec4ebcb9c0b1c93e 100644 (file)
@@ -305,6 +305,8 @@ static NTSTATUS idmap_ldap_alloc_init(const char *params)
        }
        CHECK_ALLOC_DONE( idmap_alloc_ldap->url );
 
+       trim_char(idmap_alloc_ldap->url, '\"', '\"');
+
        tmp = lp_parm_const_string(-1, "idmap alloc config",
                                   "ldap_base_dn", NULL);
        if ( ! tmp || ! *tmp) {