s3:winbind:idmap: remove unused idmap_alloc_init().
authorMichael Adam <obnox@samba.org>
Sun, 30 May 2010 22:27:23 +0000 (00:27 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 31 May 2010 15:34:03 +0000 (17:34 +0200)
source3/winbindd/idmap.c

index cc7ca629fcbfbe69c2dfa0fb3c200fe63ca16aac..ab7639913c021fb1292e5cf7602e291d34ac8a70 100644 (file)
@@ -522,85 +522,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;;
-
-       static_init_idmap;
-
-       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
 **************************************************************************/