summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-31 00:27:23 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:37 +0200
commitfe8b1588b465bd84a20cc137aabdaab7453a2211 (patch)
treeb084d904cb5d54e0bb8415329d4ef4e5ba696346 /source3
parent212468bc6e032c1f704a1d5042222b7299f9bcfb (diff)
downloadsamba-fe8b1588b465bd84a20cc137aabdaab7453a2211.tar.gz
samba-fe8b1588b465bd84a20cc137aabdaab7453a2211.tar.bz2
samba-fe8b1588b465bd84a20cc137aabdaab7453a2211.zip
s3:idmap: remove unused idmap_alloc_init().
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap.c79
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,
- &params)) {
- 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
**************************************************************************/