From 75a6c244591b4bc13c494c2b0ec40926379d2d4a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 31 May 2010 11:44:44 +0200 Subject: s3:idmap: remove unused smb_register_idmap_alloc(). 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 | 2 -- source3/winbindd/idmap.c | 49 ------------------------------------------------ 2 files changed, 51 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 952bea4232..d0eb6db43c 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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); diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index eda1986ca6..564df3ced1 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -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; -- cgit