summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-03-31 15:20:07 +0000
committerChristof Schmitt <cs@samba.org>2017-05-08 21:08:23 +0200
commit54a0e7e3d7332f420f36a3a20dd62156e6adea46 (patch)
tree9c23d9370c08a849755e0574e01c3c3b8b13cf21 /source3
parentaf09a733e953072707cde7df0126652e646970f6 (diff)
downloadsamba-54a0e7e3d7332f420f36a3a20dd62156e6adea46.tar.gz
idmap_rfc2307: Don't stop after 30 entries
We start over again and again, so we need to search in the whole list. This is a quick hack generating a bad O(n^2). The real fix is to call idmap_rfc2307_find_map with "maps" starting at the right offset, but that's an optimization for later when it's restructured 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>
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_rfc2307.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/winbindd/idmap_rfc2307.c b/source3/winbindd/idmap_rfc2307.c
index deb25cc70c8..306bc8af762 100644
--- a/source3/winbindd/idmap_rfc2307.c
+++ b/source3/winbindd/idmap_rfc2307.c
@@ -520,10 +520,7 @@ static struct id_map* idmap_rfc2307_find_map(struct idmap_rfc2307_map *maps,
DEBUG(10, ("Looking for name %s, type %d\n", name, type));
- for (i = 0; i < IDMAP_LDAP_MAX_IDS; i++) {
- if (maps[i].map == NULL) { /* end of the run */
- return NULL;
- }
+ for (i = 0; maps[i].map != NULL; i++) {
DEBUG(10, ("Entry %d: name %s, type %d\n",
i, maps[i].name, maps[i].type));
if (type == maps[i].type && strcmp(name, maps[i].name) == 0) {