diff options
author | Christian Ambach <ambi@samba.org> | 2013-05-27 14:48:27 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-06-21 10:44:23 +0200 |
commit | 6a048b424a2ecf38614aa6912f0d8c8a26c87ad5 (patch) | |
tree | 9d628a5c0df1af36a514fdaec834003e406c231f | |
parent | 324b3cc00cb97ff8d13bb3dd42e6fdcf0bea67a5 (diff) | |
download | samba-6a048b424a2ecf38614aa6912f0d8c8a26c87ad5.tar.gz samba-6a048b424a2ecf38614aa6912f0d8c8a26c87ad5.tar.bz2 samba-6a048b424a2ecf38614aa6912f0d8c8a26c87ad5.zip |
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 <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | source3/passdb/pdb_tdb.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |