]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Properly initialize mangle_hash
authorVolker Lendecke <vl@samba.org>
Tue, 19 Aug 2014 14:32:15 +0000 (14:32 +0000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 2 Sep 2014 18:39:20 +0000 (20:39 +0200)
[Bug 10782] mangle_hash() can fail to initialize charset (smbd crash).

https://bugzilla.samba.org/show_bug.cgi?id=10782

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 26 01:30:38 CEST 2014 on sn-devel-104

source3/smbd/mangle_hash.c

index 8a44ea2d6a2c0a64aa637989757cb80674a6d76b..f3d8522333002ab8d90528393005fd886ea30578 100644 (file)
@@ -767,6 +767,10 @@ const struct mangle_fns *mangle_hash_init(void)
 {
        mangle_reset();
 
+       if (chartest == NULL) {
+               init_chartest();
+       }
+
        /* Create the in-memory tdb using our custom hash function. */
        tdb_mangled_cache = tdb_open_ex("mangled_cache", 1031, TDB_INTERNAL,
                                (O_RDWR|O_CREAT), 0644, NULL, fast_string_hash);