diff options
author | Chris Toshok <toshok@src.gnome.org> | 2000-04-30 19:26:52 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-04-30 19:26:52 +0800 |
commit | 685a2424931709064b00465a109a253977caef05 (patch) | |
tree | f67d2c124c787cf292d4c3c2aca6863a04e1153f /addressbook | |
parent | 39da899bbc1d2a63db3655f5ae776246fa26cbda (diff) | |
download | gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.tar gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.tar.gz gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.tar.bz2 gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.tar.lz gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.tar.xz gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.tar.zst gsoc2013-evolution-685a2424931709064b00465a109a253977caef05.zip |
add support for a rootdn in the uri.
* backend/pas/pas-backend-ldap.c
(pas_backend_ldap_ensure_connected): add support for a rootdn in
the uri.
(pas_backend_ldap_build_all_cards_list): make use of the rootdn in
the call to ldap_search_s.
(pas_backend_ldap_search): same.
(pas_backend_ldap_load_uri): get the rootdn out of the passed in uri.
svn path=/trunk/; revision=2688
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 10 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-backend-ldap.c | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 6bdaa6c9ca..cdaeb03abc 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,13 @@ +2000-04-30 Chris Toshok <toshok@helixcode.com> + + * backend/pas/pas-backend-ldap.c + (pas_backend_ldap_ensure_connected): add support for a rootdn in + the uri. + (pas_backend_ldap_build_all_cards_list): make use of the rootdn in + the call to ldap_search_s. + (pas_backend_ldap_search): same. + (pas_backend_ldap_load_uri): get the rootdn out of the passed in uri. + 2000-04-29 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-card.c, backend/ebook/e-card.h: Added diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 95d80d898d..82694510ba 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -33,6 +33,7 @@ struct _PASBackendLDAPPrivate { GList *clients; LDAP *ldap; gchar *ldap_host; + gchar *ldap_rootdn; int ldap_port; GList *book_views; }; @@ -151,9 +152,11 @@ pas_backend_ldap_ensure_connected (PASBackendLDAP *bl) } else g_warning ("pas_backend_ldap_ensure_connected failed for " - "'ldap://%s:%d/' (error %s)\n", + "'ldap://%s:%d/%s' (error %s)\n", bl->priv->ldap_host, bl->priv->ldap_port, + bl->priv->ldap_rootdn ? bl->priv->ldap_rootdn : "", + ldap_err2string(ldap->ld_errno)); } @@ -205,7 +208,7 @@ pas_backend_ldap_build_all_cards_list(PASBackend *backend, ldap->ld_sizelimit = LDAP_MAX_SEARCH_RESPONSES; if ((ldap_error = ldap_search_s (ldap, - NULL, + bl->priv->ldap_rootdn, LDAP_SCOPE_ONELEVEL, "(objectclass=*)", NULL, 0, &res)) == -1) { @@ -726,7 +729,7 @@ pas_backend_ldap_search (PASBackendLDAP *bl, ldap->ld_sizelimit = LDAP_MAX_SEARCH_RESPONSES; if ((view->search_msgid = ldap_search (ldap, - NULL, + bl->priv->ldap_rootdn, LDAP_SCOPE_ONELEVEL, ldap_query, NULL, 0)) == -1) { @@ -883,6 +886,7 @@ pas_backend_ldap_load_uri (PASBackend *backend, if (LDAP_SUCCESS == ldap_error) { bl->priv->ldap_host = g_strdup(lud->lud_host); bl->priv->ldap_port = lud->lud_port; + bl->priv->ldap_rootdn = g_strdup(lud->lud_dn); ldap_free_urldesc(lud); |