From 6a048b424a2ecf38614aa6912f0d8c8a26c87ad5 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Mon, 27 May 2013 14:48:27 +0200 Subject: s3:passdb/pdb_tdb add parameter to control handling of BUILTIN with tdbsam:map builtin, one can control if tdbsam should be used to map entries from BUILTIN or not. By default, they will be mapped (as in older releases) Signed-off-by: Christian Ambach Reviewed-by: Michael Adam --- source3/passdb/pdb_tdb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index bd6e123e31..f256e6c7fb 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -59,6 +59,7 @@ static int tdbsam_debug_level = DBGC_ALL; static struct db_context *db_sam; static char *tdbsam_filename; +static bool map_builtin; struct tdbsam_convert_state { int32_t from; @@ -1276,6 +1277,11 @@ static bool tdbsam_search_users(struct pdb_methods *methods, return true; } +static bool tdbsam_is_responsible_for_builtin(struct pdb_methods *m) +{ + return map_builtin; +} + /********************************************************************* Initialize the tdb sam backend. Setup the dispath table of methods, open the tdb, etc... @@ -1304,6 +1310,10 @@ static NTSTATUS pdb_init_tdbsam(struct pdb_methods **pdb_method, const char *loc (*pdb_method)->capabilities = tdbsam_capabilities; (*pdb_method)->new_rid = tdbsam_new_rid; + (*pdb_method)->is_responsible_for_builtin = + tdbsam_is_responsible_for_builtin; + map_builtin = lp_parm_bool(-1, "tdbsam", "map builtin", true); + /* save the path for later */ if (!location) { -- cgit