From b359b0c160e6c13249a6226583dec9553874b232 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 28 Mar 2014 15:36:22 +1300 Subject: passdb: Allow a passdb module to do idmap for everything This patch seems odd, but the pdb_samba_dsdb module has exactly this semantics. That is, the pdb_samba_dsdb is responsible for all IDMAP values, due to backing on to the idmap.ldb allocator. This option is added so we can continue to support the mappings written into that database even when switching winbindd implementations - the source4/ winbind code would only ask the idmap_ldb code, no matter what the SID. Almost all of the behaviour for this is already in winbindd, but we need this extra flag function so as to avoid (currently intentional) errors at startup due to not having a per-domain allocation configured in the smb.conf. Andrew Bartlett Change-Id: I6b0d7a1463fe28dfd36715af0285911ecc07585c Signed-off-by: Andrew Bartlett Reviewed-by: Kamen Mazdrashki --- source3/passdb/pdb_interface.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/passdb/pdb_interface.c') diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index e2057e3b361..2c82856bc0a 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -2447,6 +2447,12 @@ static bool pdb_default_is_responsible_for_unix_groups( return true; } +static bool pdb_default_is_responsible_for_everything_else( + struct pdb_methods *methods) +{ + return false; +} + bool pdb_is_responsible_for_our_sam(void) { struct pdb_methods *pdb = pdb_get_methods(); @@ -2477,6 +2483,12 @@ bool pdb_is_responsible_for_unix_groups(void) return pdb->is_responsible_for_unix_groups(pdb); } +bool pdb_is_responsible_for_everything_else(void) +{ + struct pdb_methods *pdb = pdb_get_methods(); + return pdb->is_responsible_for_everything_else(pdb); +} + /******************************************************************* secret methods *******************************************************************/ @@ -2637,6 +2649,8 @@ NTSTATUS make_pdb_method( struct pdb_methods **methods ) pdb_default_is_responsible_for_unix_users; (*methods)->is_responsible_for_unix_groups = pdb_default_is_responsible_for_unix_groups; + (*methods)->is_responsible_for_everything_else = + pdb_default_is_responsible_for_everything_else; return NT_STATUS_OK; } -- cgit v1.2.1