svn commit: samba r23404 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

idra at samba.org idra at samba.org
Sat Jun 9 18:18:25 GMT 2007


Author: idra
Date: 2007-06-09 18:18:24 +0000 (Sat, 09 Jun 2007)
New Revision: 23404

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23404

Log:

Fix wrong (and missing) action on error condition in ldap reply evaluation loop
Fixes one of the segfaults in bug #4667


Modified:
   branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c	2007-06-09 07:17:24 UTC (rev 23403)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c	2007-06-09 18:18:24 UTC (rev 23404)
@@ -965,7 +965,7 @@
 		}
 		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 @@
 		} 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(

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
===================================================================
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c	2007-06-09 07:17:24 UTC (rev 23403)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c	2007-06-09 18:18:24 UTC (rev 23404)
@@ -962,7 +962,7 @@
 		}
 		if ( ! entry) {
 			DEBUG(2, ("ERROR: Unable to fetch ldap entries from results\n"));
-			continue;
+			break;
 		}
 
 		/* first check if the SID is present */
@@ -1177,6 +1177,10 @@
 		} 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(

Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c	2007-06-09 07:17:24 UTC (rev 23403)
+++ branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c	2007-06-09 18:18:24 UTC (rev 23404)
@@ -962,7 +962,7 @@
 		}
 		if ( ! entry) {
 			DEBUG(2, ("ERROR: Unable to fetch ldap entries from results\n"));
-			continue;
+			break;
 		}
 
 		/* first check if the SID is present */
@@ -1177,6 +1177,10 @@
 		} 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(



More information about the samba-cvs mailing list