]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
idmap_rfc2307: "ldap_next_entry" needs the previous entry, not the start
authorVolker Lendecke <vl@samba.org>
Fri, 31 Mar 2017 15:23:39 +0000 (15:23 +0000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 16 May 2017 07:15:06 +0000 (09:15 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
(cherry picked from commit 803ea2d2b7820939d03f7eb381c3cf719a00ff4a)

source3/winbindd/idmap_rfc2307.c

index 1102790d5a9ec44bb04c6d89771f1ad2327e4104..0e0311abd81bf5b7620f4c30b6464d870077f385 100644 (file)
@@ -236,7 +236,7 @@ static void idmap_rfc2307_map_sid_results(struct idmap_rfc2307_context *ctx,
                if (i == 0) {
                        entry = ldap_first_entry(ctx->ldap, result);
                } else {
-                       entry = ldap_next_entry(ctx->ldap, result);
+                       entry = ldap_next_entry(ctx->ldap, entry);
                }
                if (!entry) {
                        DEBUG(2, ("Unable to fetch entry.\n"));