check against LDAP_SUCCESS as the return value, not -1.
2001-11-14 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (search_for_dn): check against LDAP_SUCCESS as the return value, not -1. (pas_backend_ldap_build_all_cards_list): same. (pas_backend_ldap_process_authenticate_user): same. svn path=/trunk/; revision=14724
This commit is contained in:

committed by
Chris Toshok

parent
e8d02483a8
commit
ae879d7443
@ -1,3 +1,10 @@
|
|||||||
|
2001-11-14 Chris Toshok <toshok@ximian.com>
|
||||||
|
|
||||||
|
* backend/pas/pas-backend-ldap.c (search_for_dn): check against
|
||||||
|
LDAP_SUCCESS as the return value, not -1.
|
||||||
|
(pas_backend_ldap_build_all_cards_list): same.
|
||||||
|
(pas_backend_ldap_process_authenticate_user): same.
|
||||||
|
|
||||||
2001-11-12 Chris Toshok <toshok@ximian.com>
|
2001-11-12 Chris Toshok <toshok@ximian.com>
|
||||||
|
|
||||||
[ Fixes Ximian bug #14843 ]
|
[ Fixes Ximian bug #14843 ]
|
||||||
|
@ -435,7 +435,7 @@ search_for_dn (PASBackendLDAP *bl, const char *dn)
|
|||||||
dn,
|
dn,
|
||||||
LDAP_SCOPE_BASE,
|
LDAP_SCOPE_BASE,
|
||||||
"(objectclass=*)",
|
"(objectclass=*)",
|
||||||
NULL, 0, &res) != -1) {
|
NULL, 0, &res) == LDAP_SUCCESS) {
|
||||||
e = ldap_first_entry (ldap, res);
|
e = ldap_first_entry (ldap, res);
|
||||||
while (NULL != e) {
|
while (NULL != e) {
|
||||||
if (!strcmp (ldap_get_dn (ldap, e), dn)) {
|
if (!strcmp (ldap_get_dn (ldap, e), dn)) {
|
||||||
@ -1285,7 +1285,7 @@ pas_backend_ldap_build_all_cards_list(PASBackend *backend,
|
|||||||
bl->priv->ldap_rootdn,
|
bl->priv->ldap_rootdn,
|
||||||
bl->priv->ldap_scope,
|
bl->priv->ldap_scope,
|
||||||
"(objectclass=*)",
|
"(objectclass=*)",
|
||||||
NULL, 0, &res)) == -1) {
|
NULL, 0, &res)) != LDAP_SUCCESS) {
|
||||||
g_warning ("ldap error '%s' in "
|
g_warning ("ldap error '%s' in "
|
||||||
"pas_backend_ldap_build_all_cards_list\n",
|
"pas_backend_ldap_build_all_cards_list\n",
|
||||||
ldap_err2string(ldap_error));
|
ldap_err2string(ldap_error));
|
||||||
@ -2360,11 +2360,13 @@ pas_backend_ldap_process_authenticate_user (PASBackend *backend,
|
|||||||
|
|
||||||
query = g_strdup_printf ("(mail=%s)", req->user);
|
query = g_strdup_printf ("(mail=%s)", req->user);
|
||||||
|
|
||||||
if (ldap_search_s (bl->priv->ldap,
|
ldap_error = ldap_search_s (bl->priv->ldap,
|
||||||
bl->priv->ldap_rootdn,
|
bl->priv->ldap_rootdn,
|
||||||
bl->priv->ldap_scope,
|
bl->priv->ldap_scope,
|
||||||
query,
|
query,
|
||||||
NULL, 0, &res) != -1) {
|
NULL, 0, &res);
|
||||||
|
|
||||||
|
if (ldap_error == LDAP_SUCCESS) {
|
||||||
char *dn;
|
char *dn;
|
||||||
|
|
||||||
e = ldap_first_entry (bl->priv->ldap, res);
|
e = ldap_first_entry (bl->priv->ldap, res);
|
||||||
|
Reference in New Issue
Block a user