/* Allocate a Unix-ID. */
NTSTATUS (*allocate_id)(struct idmap_domain *dom, struct unixid *id);
-
- /* Called when backend is unloaded */
- NTSTATUS (*close_fn)(struct idmap_domain *dom);
};
#include "winbindd/idmap_proto.h"
return NT_STATUS_OK;
}
-static int close_domain_destructor(struct idmap_domain *dom)
-{
- NTSTATUS ret;
-
- ret = dom->methods->close_fn(dom);
- if (!NT_STATUS_IS_OK(ret)) {
- DEBUG(3, ("Failed to close idmap domain [%s]!\n", dom->name));
- }
-
- return 0;
-}
-
static bool parse_idmap_module(TALLOC_CTX *mem_ctx, const char *param,
char **pmodulename, char **pargs)
{
goto fail;
}
- talloc_set_destructor(result, close_domain_destructor);
-
return result;
fail:
return ret;
}
-/************************************************************************
- ***********************************************************************/
-
-static NTSTATUS idmap_ad_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
/*
* nss_info_{sfu,sfu20,rfc2307}
*/
return nt_status;
}
-
-/************************************************************************
- ***********************************************************************/
-
-static NTSTATUS nss_ad_close( void )
-{
- /* nothing to do. All memory is free()'d by the idmap close_fn() */
-
- return NT_STATUS_OK;
-}
-
/************************************************************************
Function dispatch tables for the idmap and nss plugins
***********************************************************************/
.init = idmap_ad_initialize,
.unixids_to_sids = idmap_ad_unixids_to_sids,
.sids_to_unixids = idmap_ad_sids_to_unixids,
- .close_fn = idmap_ad_close
};
/* The SFU and RFC2307 NSS plugins share everything but the init
.get_nss_info = nss_ad_get_info,
.map_to_alias = nss_ad_map_to_alias,
.map_from_alias = nss_ad_map_from_alias,
- .close_fn = nss_ad_close
};
static struct nss_info_methods nss_sfu_methods = {
.get_nss_info = nss_ad_get_info,
.map_to_alias = nss_ad_map_to_alias,
.map_from_alias = nss_ad_map_from_alias,
- .close_fn = nss_ad_close
};
static struct nss_info_methods nss_sfu20_methods = {
.get_nss_info = nss_ad_get_info,
.map_to_alias = nss_ad_map_to_alias,
.map_from_alias = nss_ad_map_from_alias,
- .close_fn = nss_ad_close
};
return NT_STATUS_OK;
}
-/**********************************************************************
- *********************************************************************/
-
-static NTSTATUS _idmap_adex_close(struct idmap_domain
- *dom)
-{
- /* FIXME! need to do cleanup here */
-
- return NT_STATUS_OK;
-}
-
/*
* IdMap NSS plugin
*/
.init = _idmap_adex_init,
.unixids_to_sids = _idmap_adex_get_sid_from_id,
.sids_to_unixids = _idmap_adex_get_id_from_sid,
- .close_fn = _idmap_adex_close
};
static struct nss_info_methods adex_nss_methods = {
.init = _nss_adex_init,
/*
Close the idmap tdb instance
*/
-static NTSTATUS idmap_autorid_close(struct idmap_domain *dom)
-{
- /* don't do anything */
- return NT_STATUS_OK;
-}
-
static struct idmap_methods autorid_methods = {
.init = idmap_autorid_initialize,
.unixids_to_sids = idmap_autorid_unixids_to_sids,
.sids_to_unixids = idmap_autorid_sids_to_unixids,
- .close_fn = idmap_autorid_close
};
NTSTATUS idmap_autorid_init(void)
return nt_status;
}
-/*********************************************************************
- ********************************************************************/
-
-static NTSTATUS be_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
/*********************************************************************
********************************************************************/
.init = be_init,
.unixids_to_sids = unixids_to_sids,
.sids_to_unixids = sids_to_unixids,
- .close_fn = be_close
};
static struct nss_info_methods hash_nss_methods = {
Close the idmap ldap instance
**********************************/
-static NTSTATUS idmap_ldap_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
static struct idmap_methods idmap_ldap_methods = {
.init = idmap_ldap_db_init,
.unixids_to_sids = idmap_ldap_unixids_to_sids,
.sids_to_unixids = idmap_ldap_sids_to_unixids,
.allocate_id = idmap_ldap_get_new_id,
- .close_fn = idmap_ldap_close
};
NTSTATUS idmap_ldap_init(void);
Close the idmap tdb instance
**********************************/
-static NTSTATUS idmap_nss_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
static struct idmap_methods nss_methods = {
.init = idmap_nss_int_init,
.unixids_to_sids = idmap_nss_unixids_to_sids,
.sids_to_unixids = idmap_nss_sids_to_unixids,
- .close_fn = idmap_nss_close
};
NTSTATUS idmap_nss_init(void)
Close the idmap tdb instance
**********************************/
-static NTSTATUS idmap_pdb_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
static struct idmap_methods passdb_methods = {
.init = idmap_pdb_init,
.unixids_to_sids = idmap_pdb_unixids_to_sids,
.sids_to_unixids = idmap_pdb_sids_to_unixids,
- .close_fn =idmap_pdb_close
};
NTSTATUS idmap_passdb_init(void)
return NT_STATUS_OK;
}
-static NTSTATUS idmap_rid_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
static struct idmap_methods rid_methods = {
.init = idmap_rid_initialize,
.unixids_to_sids = idmap_rid_unixids_to_sids,
.sids_to_unixids = idmap_rid_sids_to_unixids,
- .close_fn = idmap_rid_close
};
NTSTATUS idmap_rid_init(void)
Close the idmap tdb instance
**********************************/
-static NTSTATUS idmap_tdb_close(struct idmap_domain *dom)
-{
- return NT_STATUS_OK;
-}
-
static struct idmap_methods db_methods = {
.init = idmap_tdb_db_init,
.unixids_to_sids = idmap_tdb_unixids_to_sids,
.sids_to_unixids = idmap_tdb_sids_to_unixids,
.allocate_id = idmap_tdb_get_new_id,
- .close_fn = idmap_tdb_close
};
NTSTATUS idmap_tdb_init(void)