summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-06-09 18:18:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:13 -0500
commit6c5805aa70c6d928b38247bb6cf0f5ad9428cc69 (patch)
tree2ffcae43be3ef2da92fc02ba654e963563fb5749 /source3/nsswitch
parentf461e53e7a493b15c53c97a5e1210cab5b069282 (diff)
downloadsamba-6c5805aa70c6d928b38247bb6cf0f5ad9428cc69.tar.gz
samba-6c5805aa70c6d928b38247bb6cf0f5ad9428cc69.tar.bz2
samba-6c5805aa70c6d928b38247bb6cf0f5ad9428cc69.zip
r23404: Fix wrong (and missing) action on error condition in ldap reply evaluation loop
Fixes one of the segfaults in bug #4667 (This used to be commit 176e1c0b692b9509a29bbbb2b35ad821dfb0d5aa)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/idmap_ldap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/nsswitch/idmap_ldap.c b/source3/nsswitch/idmap_ldap.c
index 7fdf16beaa..e5dd658fe3 100644
--- a/source3/nsswitch/idmap_ldap.c
+++ b/source3/nsswitch/idmap_ldap.c
@@ -965,7 +965,7 @@ again:
}
if ( ! entry) {
DEBUG(2, ("ERROR: Unable to fetch ldap entries from results\n"));
- continue;
+ break;
}
/* first check if the SID is present */
@@ -1180,6 +1180,10 @@ again:
} else { /* following ones */
entry = ldap_next_entry(ctx->smbldap_state->ldap_struct, entry);
}
+ if ( ! entry) {
+ DEBUG(2, ("ERROR: Unable to fetch ldap entries from results\n"));
+ break;
+ }
/* first check if the SID is present */
sidstr = smbldap_talloc_single_attribute(