s3:idmap: remove unused smb_register_idmap_alloc().
authorMichael Adam <obnox@samba.org>
Mon, 31 May 2010 09:44:44 +0000 (11:44 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 14 Aug 2010 00:10:39 +0000 (02:10 +0200)
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

source3/include/proto.h
source3/winbindd/idmap.c

index 952bea42320f06eebd57f3dde7340e878bfa0f97..d0eb6db43c3c746ee607e5d540982a29952d1ddd 100644 (file)
@@ -6010,8 +6010,6 @@ bool idmap_is_offline(void);
 bool idmap_is_online(void);
 NTSTATUS smb_register_idmap(int version, const char *name,
                            struct idmap_methods *methods);
-NTSTATUS smb_register_idmap_alloc(int version, const char *name,
-                                 struct idmap_alloc_methods *methods);
 void idmap_close(void);
 NTSTATUS idmap_init_cache(void);
 NTSTATUS idmap_allocate_uid(struct unixid *id);
index eda1986ca6384fa7e63d834eda2bf7f07557c978..564df3ced1dcc46ae6d4ccd2141fc595e054ae65 100644 (file)
@@ -185,55 +185,6 @@ NTSTATUS smb_register_idmap(int version, const char *name,
        return NT_STATUS_OK;
 }
 
-/**********************************************************************
- Allow a module to register itself as an alloc method.
-**********************************************************************/
-
-NTSTATUS smb_register_idmap_alloc(int version, const char *name,
-                                 struct idmap_alloc_methods *methods)
-{
-       struct idmap_alloc_methods *test;
-       struct idmap_alloc_backend *entry;
-
-       if ((version != SMB_IDMAP_INTERFACE_VERSION)) {
-               DEBUG(0, ("Failed to register idmap alloc module.\n"
-                         "The module was compiled against "
-                         "SMB_IDMAP_INTERFACE_VERSION %d,\n"
-                         "current SMB_IDMAP_INTERFACE_VERSION is %d.\n"
-                         "Please recompile against the current version "
-                         "of samba!\n",
-                         version, SMB_IDMAP_INTERFACE_VERSION));
-               return NT_STATUS_OBJECT_TYPE_MISMATCH;
-       }
-
-       if (!name || !name[0] || !methods) {
-               DEBUG(0,("Called with NULL pointer or empty name!\n"));
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       test = get_alloc_methods(name);
-       if (test) {
-               DEBUG(0,("idmap_alloc module %s already registered!\n", name));
-               return NT_STATUS_OBJECT_NAME_COLLISION;
-       }
-
-       entry = talloc(NULL, struct idmap_alloc_backend);
-       if ( ! entry) {
-               DEBUG(0,("Out of memory!\n"));
-               return NT_STATUS_NO_MEMORY;
-       }
-       entry->name = talloc_strdup(entry, name);
-       if ( ! entry->name) {
-               DEBUG(0,("Out of memory!\n"));
-               return NT_STATUS_NO_MEMORY;
-       }
-       entry->methods = methods;
-
-       DLIST_ADD(alloc_backends, entry);
-       DEBUG(5, ("Successfully added idmap alloc backend '%s'\n", name));
-       return NT_STATUS_OK;
-}
-
 static int close_domain_destructor(struct idmap_domain *dom)
 {
        NTSTATUS ret;