param: Add lpcfg_tdb_hash_size()
authorVolker Lendecke <vl@samba.org>
Wed, 26 Mar 2014 14:04:41 +0000 (14:04 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 31 Mar 2014 20:52:13 +0000 (22:52 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/param/loadparm.c

index 51053baa47d482ca0c73f37cfd6ca53e4c16c2a5..9ad14d8ae4f017d9e443bf90d12d5a1afc3d0b56 100644 (file)
@@ -2778,3 +2778,21 @@ bool lpcfg_server_signing_allowed(struct loadparm_context *lp_ctx, bool *mandato
 
        return allowed;
 }
+
+int lpcfg_tdb_hash_size(struct loadparm_context *lp_ctx, const char *name)
+{
+       const char *base;
+
+       if (name == NULL) {
+               return 0;
+       }
+
+       base = strrchr_m(name, '/');
+       if (base != NULL) {
+               base += 1;
+       } else {
+               base = name;
+       }
+       return lpcfg_parm_int(lp_ctx, NULL, "tdb_hashsize", base, 0);
+
+}