diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/idmap.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index 5280136fdb..eda1986ca6 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -537,85 +537,6 @@ void idmap_close(void) num_domains = 0; } -/** - * Initialize the idmap alloc backend - * @param[out] ctx Where to put the alloc_ctx? - * @result Did it work fine? - * - * This routine first looks at "idmap alloc backend" and if that is not - * defined, it uses "idmap backend" for the module name. - */ -static NTSTATUS idmap_alloc_init(struct idmap_alloc_context **ctx) -{ - const char *backend; - char *modulename, *params; - NTSTATUS ret = NT_STATUS_NO_MEMORY;; - - idmap_init(); - - if (idmap_alloc_ctx != NULL) { - *ctx = idmap_alloc_ctx; - return NT_STATUS_OK; - } - - idmap_alloc_ctx = talloc(NULL, struct idmap_alloc_context); - if (idmap_alloc_ctx == NULL) { - DEBUG(0, ("talloc failed\n")); - goto fail; - } - - backend = lp_idmap_alloc_backend(); - if ((backend == NULL) || (backend[0] == '\0')) { - backend = lp_idmap_backend(); - } - - if (backend == NULL) { - DEBUG(3, ("no idmap alloc backend defined\n")); - ret = NT_STATUS_INVALID_PARAMETER; - goto fail; - } - - if (!parse_idmap_module(idmap_alloc_ctx, backend, &modulename, - ¶ms)) { - DEBUG(1, ("parse_idmap_module %s failed\n", backend)); - goto fail; - } - - idmap_alloc_ctx->methods = get_alloc_methods(modulename); - - if (idmap_alloc_ctx->methods == NULL) { - ret = smb_probe_module("idmap", modulename); - if (NT_STATUS_IS_OK(ret)) { - idmap_alloc_ctx->methods = - get_alloc_methods(modulename); - } - } - - if (idmap_alloc_ctx->methods == NULL) { - DEBUG(1, ("could not find idmap alloc module %s\n", backend)); - ret = NT_STATUS_INVALID_PARAMETER; - goto fail; - } - - ret = idmap_alloc_ctx->methods->init(params); - - if (!NT_STATUS_IS_OK(ret)) { - DEBUG(0, ("ERROR: Initialization failed for alloc " - "backend, deferred!\n")); - goto fail; - } - - TALLOC_FREE(modulename); - TALLOC_FREE(params); - - *ctx = idmap_alloc_ctx; - return NT_STATUS_OK; - -fail: - TALLOC_FREE(idmap_alloc_ctx); - return ret; -} - /************************************************************************** idmap allocator interface functions **************************************************************************/ |