1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Rename pdb_ldap to pdb_ldapsam

This patch moves pdb_ldap to pdb_ldapsam unconditionally
and makes possible to load ldapsam.so dynamically

Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
Andreas Schneider 2013-01-28 16:16:42 +01:00 committed by Alexander Bokovoy
parent 6ba7ab5c14
commit 1b582c4bf8
6 changed files with 17 additions and 13 deletions

View File

@ -1446,7 +1446,7 @@ static NTSTATUS pdb_init_IPA_ldapsam(struct pdb_methods **pdb_method, const char
struct ldapsam_privates *ldap_state;
NTSTATUS status;
status = pdb_init_ldapsam(pdb_method, location);
status = pdb_ldapsam_init_common(pdb_method, location);
if (!NT_STATUS_IS_OK(status)) {
return status;
}

View File

@ -6439,7 +6439,8 @@ static NTSTATUS pdb_init_ldapsam_common(struct pdb_methods **pdb_method, const c
Initialise the normal mode for pdb_ldap
*********************************************************************/
NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location)
NTSTATUS pdb_ldapsam_init_common(struct pdb_methods **pdb_method,
const char *location)
{
NTSTATUS nt_status;
struct ldapsam_privates *ldap_state = NULL;
@ -6588,11 +6589,16 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location)
return NT_STATUS_OK;
}
NTSTATUS pdb_ldap_init(void)
NTSTATUS pdb_ldapsam_init(void)
{
NTSTATUS nt_status;
if (!NT_STATUS_IS_OK(nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam", pdb_init_ldapsam)))
nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION,
"ldapsam",
pdb_ldapsam_init_common);
if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}
/* Let pdb_nds register backends */
pdb_nds_init();

View File

@ -29,8 +29,8 @@
/* The following definitions come from passdb/pdb_ldap.c */
const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
NTSTATUS pdb_ldap_init(void);
NTSTATUS pdb_ldapsam_init_common(struct pdb_methods **pdb_method, const char *location);
NTSTATUS pdb_ldapsam_init(void);
int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
const char *user,
LDAPMessage ** result,

View File

@ -878,7 +878,7 @@ static NTSTATUS pdb_init_NDS_ldapsam_common(struct pdb_methods **pdb_method, con
static NTSTATUS pdb_init_NDS_ldapsam(struct pdb_methods **pdb_method, const char *location)
{
NTSTATUS nt_status = pdb_init_ldapsam(pdb_method, location);
NTSTATUS nt_status = pdb_ldapsam_init_common(pdb_method, location);
(*pdb_method)->name = "NDS_ldapsam";

View File

@ -13,15 +13,13 @@ bld.SAMBA3_MODULE('pdb_tdbsam',
internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_tdbsam'),
enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_tdbsam'))
# This cannot be built as a shared module cause it has two init functions. The
# code needs to be cleaned up and split to allow this.
bld.SAMBA3_MODULE('pdb_ldap',
bld.SAMBA3_MODULE('pdb_ldapsam',
subsystem='pdb',
deps='smbldap smbldaphelper',
source=PDB_LDAP_SRC,
init_function='',
internal_module=True,
enabled=bld.CONFIG_SET('HAVE_LDAP'))
internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_ldapsam'),
enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_ldapsam') and bld.CONFIG_SET('HAVE_LDAP'))
bld.SAMBA3_MODULE('pdb_smbpasswd',
subsystem='pdb',

View File

@ -1730,7 +1730,7 @@ main() {
default_shared_modules.extend(TO_LIST('vfs_aio_linux'))
if conf.CONFIG_SET('HAVE_LDAP'):
default_static_modules.extend(TO_LIST('pdb_ldap idmap_ldap'))
default_static_modules.extend(TO_LIST('pdb_ldapsam idmap_ldap'))
if conf.CONFIG_SET('DARWINOS'):
default_static_modules.extend(TO_LIST('charset_macosxfs'))