s3-winbindd: Fix #10264, cache_traverse_validate_fn failure for NDR cache entries.
authorGünther Deschner <gd@samba.org>
Wed, 13 Nov 2013 14:10:33 +0000 (15:10 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 13 Nov 2013 18:33:46 +0000 (19:33 +0100)
We need to increase the keysize limit for NDR queries. A wbint_LookupSids query
for just 20 sids already hits the older limit.

Guenther

https://bugzilla.samba.org/show_bug.cgi?id=10264
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov 13 19:33:46 CET 2013 on sn-devel-104

source3/winbindd/winbindd_cache.c

index 91c19fa2b13c3052d63453804c0448c9ec1648d4..267cefc1e01c42c0d9323200901144865e94ed9d 100644 (file)
@@ -4065,7 +4065,8 @@ static int cache_traverse_validate_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_D
        struct tdb_validation_status *v_state = (struct tdb_validation_status *)state;
 
        /* Paranoia check. */
-       if (strncmp("UA/", (const char *)kbuf.dptr, 3) == 0) {
+       if (strncmp("UA/", (const char *)kbuf.dptr, 3) == 0 ||
+           strncmp("NDR/", (const char *)kbuf.dptr, 4) == 0) {
                max_key_len = 1024 * 1024;
        }
        if (kbuf.dsize > max_key_len) {