r3737: - Get rid of the register_subsystem() and register_backend() functions.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 14 Nov 2004 22:23:23 +0000 (22:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:48 +0000 (13:05 -0500)
- Re-disable tdbtool (it was building fine on my Debian box but other
machines were having problems)
(This used to be commit 0d7bb2c40b7a9ed59df3f8944133ea562697e814)

47 files changed:
source4/auth/auth.c
source4/auth/auth_builtin.c
source4/auth/auth_sam.c
source4/auth/auth_winbind.c
source4/auth/config.mk
source4/build/pidl/proxy.pm
source4/build/pidl/server.pm
source4/build/smb_build/output.pm
source4/build/smb_build/smb_build_h.pm
source4/lib/basic.mk
source4/lib/dcom/common/tables.c
source4/lib/dcom/config.mk
source4/lib/iconv.c
source4/lib/module.c [deleted file]
source4/lib/registry/common/reg_interface.c
source4/lib/registry/config.mk
source4/lib/registry/reg_backend_dir/reg_backend_dir.c
source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c
source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
source4/lib/registry/reg_backend_w95/reg_backend_w95.c
source4/lib/tdb/config.mk
source4/libcli/auth/gensec.c
source4/libcli/auth/gensec_ntlmssp.c
source4/libcli/auth/spnego.c
source4/librpc/rpc/dcerpc_schannel.c
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/config.mk
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/nbench/vfs_nbench.c
source4/ntvfs/ntvfs_base.c
source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/print/vfs_print.c
source4/ntvfs/simple/vfs_simple.c
source4/ntvfs/unixuid/vfs_unixuid.c
source4/rpc_server/config.mk
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcom/remact.c
source4/rpc_server/remote/dcesrv_remote.c
source4/smbd/config.mk
source4/smbd/process_model.c
source4/smbd/process_model.mk
source4/smbd/process_single.c
source4/smbd/process_standard.c
source4/smbd/process_thread.c
source4/smbd/service.c

index 58075b4c752d4fed44104c5ff164a16975ffdded..cd59190a42e7ed9a8d5f133dcdb3f1546133b3c5 100644 (file)
@@ -411,7 +411,7 @@ static int num_backends;
   The 'name' can be later used by other backends to find the operations
   structure for this backend.
 */
-static NTSTATUS auth_register(const void *_ops)
+NTSTATUS auth_register(const void *_ops)
 {
        const struct auth_operations *ops = _ops;
        struct auth_operations *new_ops;
@@ -477,24 +477,6 @@ const struct auth_critical_sizes *auth_interface_version(void)
        return &critical_sizes;
 }
 
-/*
-  initialise the AUTH subsystem
-*/
-NTSTATUS auth_init(void)
-{
-       NTSTATUS status;
-       
-       status = register_subsystem("auth", auth_register); 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       auth_init_static_modules;
-       
-       DEBUG(3,("AUTH subsystem version %d initialised\n", AUTH_INTERFACE_VERSION));
-       return status;
-}
-
 NTSTATUS server_service_auth_init(void)
 {
        return NT_STATUS_OK;    
index c67b9b683564602e4f0c4c7ff5623aec70aaf67a..56c465cfae3b73fb394010109baa7d7b865662fc 100644 (file)
@@ -177,7 +177,7 @@ NTSTATUS auth_builtin_init(void)
 
        ops.name = "guest";
        ops.init = auth_init_guest;
-       ret = register_backend("auth", &ops);
+       ret = auth_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' auth backend!\n",
                        ops.name));
@@ -187,7 +187,7 @@ NTSTATUS auth_builtin_init(void)
 #ifdef DEVELOPER
        ops.name = "name_to_ntstatus";
        ops.init = auth_init_name_to_ntstatus;
-       ret = register_backend("auth", &ops);
+       ret = auth_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' auth backend!\n",
                        ops.name));
@@ -196,7 +196,7 @@ NTSTATUS auth_builtin_init(void)
 
        ops.name = "fixed_challenge";
        ops.init = auth_init_fixed_challenge;
-       ret = register_backend("auth", &ops);
+       ret = auth_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' auth backend!\n",
                        ops.name));
index 636935e0b97d121ee3b0dd2b233b7fe7678b830b..7cba6e83b3f6162042f68f1897e8c1af30a238c4 100644 (file)
@@ -631,7 +631,7 @@ NTSTATUS auth_sam_init(void)
 
        ops.name = "sam";
        ops.init = auth_init_sam;
-       ret = register_backend("auth", &ops);
+       ret = auth_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' auth backend!\n",
                        ops.name));
@@ -640,7 +640,7 @@ NTSTATUS auth_sam_init(void)
 
        ops.name = "sam_ignoredomain";
        ops.init = auth_init_sam_ignoredomain;
-       ret = register_backend("auth", &ops);
+       ret = auth_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' auth backend!\n",
                        ops.name));
index 2d8cdb72c9bf550792f663f6e9e18ee8f51595dd..66072950333ff053d959ae09c2c86f03a8950cc4 100644 (file)
@@ -151,7 +151,7 @@ NTSTATUS auth_winbind_init(void)
 
        ops.name = "winbind";
        ops.init = auth_init_winbind;
-       ret = register_backend("auth", &ops);
+       ret = auth_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' auth backend!\n",
                        ops.name));
index 65c24ca89763f822511329e483414dbd70d2d1c6..cf794e30a95eddf42947ea27c3324e1340f8f6ff 100644 (file)
@@ -37,7 +37,6 @@ REQUIRED_SUBSYSTEMS = \
 #######################
 # Start SUBSYSTEM AUTH
 [SUBSYSTEM::AUTH]
-INIT_FUNCTION = auth_init
 INIT_OBJ_FILES = \
                auth/auth.o
 ADD_OBJ_FILES = \
index b6d97334190a9a4fbc4658ad12a2e2c1f4b9f98c..fabf7cc97e1f3fdb56cdc5fc122e34e4a44ec9e8 100644 (file)
@@ -66,7 +66,7 @@ sub ParseRegFunc($)
        GUID_from_string(DCERPC_" . (uc $interface->{NAME}) . "_UUID, &iface.iid);
        iface.proxy_vtable = talloc_memdup(NULL, &proxy, sizeof(struct dcom_$interface->{NAME}_vtable));
 
-       return register_backend(\"dcom_interface\", &iface);
+       return dcom_register_interface(&iface);
 }\n\n";
 }
 
index 6a9ea157a99096a4246b94da8086facdd1afac71..2a838ccf487477efd92e22263e46360aead28b51 100644 (file)
@@ -190,7 +190,7 @@ NTSTATUS dcerpc_server_$name\_init(void)
        ep_server.interface_by_name = $name\__op_interface_by_name;
 
        /* register ourselves with the DCERPC subsystem. */
-       ret = register_backend(\"dcerpc\", &ep_server);
+       ret = dcerpc_register_ep_server(&ep_server);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,(\"Failed to register \'$name\' endpoint server!\\n\"));
index 11e994407e0683929f3c7a7eca2a808673f8b98c..d0e00c75657775569d103075519e129d09caaf04 100644 (file)
@@ -98,15 +98,8 @@ sub create_output($)
                        push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS});
                        push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS});
 
-                       push(@{$part->{MODULE_INIT_FUNCTIONS}}, @{$elem->{INIT_FUNCTION}}) if 
-                               $elem->{TYPE} eq "MODULE" and 
-                               defined($elem->{INIT_FUNCTION}) and
-                               $elem->{INIT_FUNCTION} ne "" and 
-                               $elem->{SUBSYSTEM} eq $part->{NAME};
-
                        push(@{$part->{SUBSYSTEM_INIT_FUNCTIONS}}, @{$elem->{INIT_FUNCTION}}) if 
                                $part->{OUTPUT_TYPE} eq "BINARY" and 
-                               $elem->{TYPE} eq "SUBSYSTEM" and
                                defined($elem->{INIT_FUNCTION}) and 
                                $elem->{INIT_FUNCTION} ne "";
                }
index 0f1411dde14a7ff6b5ad3dd374e562a37f968a73..f074f92199f46507889aabcd81c758551b11ed37 100644 (file)
@@ -27,34 +27,6 @@ sub _prepare_smb_build_h($)
        my $depend = shift;
        my @defines = ();
 
-       #
-       # loop over all subsystems
-       #
-       foreach my $key (values %{$depend}) {
-               next if $key->{TYPE} ne "SUBSYSTEM";
-
-               my $NAME = $key->{NAME};
-               my $DEFINE = ();
-               my $name = lc($NAME);
-
-               #
-               # Static modules
-               # 
-               $DEFINE->{COMMENT} = "SUBSYSTEM $NAME INIT";
-               $DEFINE->{KEY} = $name . "_init_static_modules";
-               $DEFINE->{VAL} = "do { \\\n";
-               foreach my $subkey (@{$key->{MODULE_INIT_FUNCTIONS}}) {
-                       $DEFINE->{VAL} .= "\t\textern NTSTATUS $subkey(void); \\\n";
-               }
-               
-               foreach my $subkey (@{$key->{MODULE_INIT_FUNCTIONS}}) {
-                       $DEFINE->{VAL} .= "\t\t$subkey(); \\\n";
-               }
-               $DEFINE->{VAL} .= "\t} while(0)";
-               
-               push(@defines,$DEFINE);
-       }
-
        #
        # loop over all binaries
        #
index 68f41db089d714a494a9b80e5c63b3d50d6d3ab8..7360eddf941b4251b744312c92e833920c0b7d4a 100644 (file)
@@ -66,7 +66,6 @@ ADD_OBJ_FILES = \
                lib/select.o \
                lib/pam_errors.o \
                intl/lang_tdb.o \
-               lib/module.o \
                lib/mutex.o \
                lib/events.o \
                lib/server_mutex.o \
index d6b7cfa78f4bfa44974b7846f590c54a5549848c..f9f1c49380c1f2575529be25bbe86f9ebcb72366 100644 (file)
@@ -72,7 +72,7 @@ const void *dcom_proxy_vtable_by_iid(const struct GUID *iid)
        return iface->proxy_vtable;
 }
 
-static NTSTATUS dcom_register_interface(const void *_iface)
+NTSTATUS dcom_register_interface(const void *_iface)
 {
        const struct dcom_interface *iface = _iface;
        struct interface_list *l = talloc_zero_p(interfaces, struct interface_list);
@@ -84,7 +84,7 @@ static NTSTATUS dcom_register_interface(const void *_iface)
        return NT_STATUS_OK;
 }
 
-static NTSTATUS dcom_register_class(const void *_class)
+NTSTATUS dcom_register_class(const void *_class)
 {
        const struct dcom_class *class = _class;
        struct class_list *l = talloc_zero_p(classes, struct class_list);
@@ -95,20 +95,3 @@ static NTSTATUS dcom_register_class(const void *_class)
        
        return NT_STATUS_OK;
 }
-
-NTSTATUS libdcom_init(void)
-{
-       NTSTATUS status;
-
-       status = register_subsystem("dcom_interface", dcom_register_interface);
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       register_subsystem("dcom_class", dcom_register_class);
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       return status;
-}
index 6ebf16324fd74578eff4d699671a7ef39caea686..21d90024d4e8d753c0084c96b89137470bd53dca 100644 (file)
@@ -1,7 +1,6 @@
 ################################################
 # Start SUBSYSTEM LIBDCOM
 [SUBSYSTEM::LIBDCOM]
-INIT_FUNCTION = libdcom_init
 INIT_OBJ_FILES = \
                lib/dcom/common/main.o \
                lib/dcom/common/tables.o
index 085ec0ec2f0d525baad798a454704422b94737d8..045ed36320f7f71647db302e859607c9f54eb48a 100644 (file)
@@ -73,7 +73,7 @@ static const struct charset_functions builtin_functions[] = {
 
 static struct charset_functions *charsets = NULL;
 
-static NTSTATUS charset_register_backend(const void *_funcs) 
+NTSTATUS charset_register_backend(const void *_funcs) 
 {
        struct charset_functions *funcs = memdup(_funcs,sizeof(struct charset_functions));
        struct charset_functions *c = charsets;
@@ -92,22 +92,6 @@ static NTSTATUS charset_register_backend(const void *_funcs)
        return NT_STATUS_OK;
 }
 
-static void lazy_initialize_iconv(void)
-{
-       static BOOL initialized = False;
-       int i;
-
-       if (!initialized) {
-               initialized = True;
-               register_subsystem("charset", charset_register_backend);
-
-               charset_init_static_modules;
-
-               for(i = 0; builtin_functions[i].name; i++) 
-                       register_backend("charset", &builtin_functions[i]);
-       }
-}
-
 #ifdef HAVE_NATIVE_ICONV
 /* if there was an error then reset the internal state,
    this ensures that we don't have a shift state remaining for
@@ -179,7 +163,6 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
        smb_iconv_t ret;
        struct charset_functions *from, *to;
        
-       lazy_initialize_iconv();
        from = charsets;
        to = charsets;
 
diff --git a/source4/lib/module.c b/source4/lib/module.c
deleted file mode 100644 (file)
index 80360e4..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   module loading system
-
-   Copyright (C) Jelmer Vernooij 2002-2004
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include "includes.h"
-#include "system/dir.h"
-#include "system/filesys.h"
-#include "dlinklist.h"
-
-#ifdef HAVE_DLOPEN
-
-/* Load module (or directory with modules) recursively. 
- * Includes running the init_module() function */
-NTSTATUS smb_load_module(const char *module_name)
-{
-       void *handle;
-       init_module_function init;
-       NTSTATUS status;
-       const char *error;
-       struct stat st;
-       DIR *dir;
-       struct dirent *dirent;
-
-       if(stat(module_name, &st) < 0) {
-               DEBUG(0, ("Can't stat module '%s'\n", module_name));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       /* If the argument is a directory, recursively load all files / 
-        * directories in it */
-
-       /* How about symlinks pointing to themselves - wouldn't we rather 
-        * want to use wildcards here? */
-       if(S_ISDIR(st.st_mode)) {
-               dir = opendir(module_name);
-               while ((dirent = readdir(dir))) {
-                       smb_load_module(dirent->d_name);
-               }
-       }
-
-       /* Always try to use LAZY symbol resolving; if the plugin has 
-        * backwards compatibility, there might be symbols in the 
-        * plugin referencing to old (removed) functions
-        */
-       handle = sys_dlopen(module_name, RTLD_LAZY);
-
-       if(!handle) {
-               DEBUG(0, ("Error loading module '%s': %s\n", module_name, sys_dlerror()));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       init = (init_module_function)sys_dlsym(handle, "init_module");
-
-       /* we must check sys_dlerror() to determine if it worked, because
-           sys_dlsym() can validly return NULL */
-       error = sys_dlerror();
-       if (error) {
-               DEBUG(0, ("Error trying to resolve symbol 'init_module' in %s: %s\n", module_name, error));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       status = init();
-
-       DEBUG(2, ("Module '%s' loaded\n", module_name));
-
-       return status;
-}
-
-/* Load all modules in list and return number of 
- * modules that has been successfully loaded */
-int smb_load_modules(const char **modules)
-{
-       int i;
-       int success = 0;
-
-       for(i = 0; modules[i]; i++){
-               if(NT_STATUS_IS_OK(smb_load_module(modules[i]))) {
-                       success++;
-               }
-       }
-
-       DEBUG(2, ("%d modules successfully loaded\n", success));
-
-       return success;
-}
-
-#else /* HAVE_DLOPEN */
-
-NTSTATUS smb_load_module(const char *module_name)
-{
-       DEBUG(0,("This samba executable has not been built with plugin support\n"));
-       return NT_STATUS_NOT_SUPPORTED;
-}
-
-int smb_load_modules(const char **modules)
-{
-       DEBUG(0,("This samba executable has not been built with plugin support\n"));
-       return -1;
-}
-
-#endif /* HAVE_DLOPEN */
-
-void init_modules(void)
-{
-       if(lp_preload_modules()) 
-               smb_load_modules(lp_preload_modules());
-}
-
-struct subsystem {
-       char *name;
-       register_backend_function callback;
-       struct subsystem *prev, *next;
-};
-
-static struct subsystem *subsystems = NULL;
-
-NTSTATUS register_subsystem(const char *name, register_backend_function callback) 
-{
-       struct subsystem *s;
-       struct subsystem *t = subsystems;
-
-       while(t) {
-               if(!strcmp(name, t->name)) {
-                       /* its already registered! */
-                       DEBUG(0,("Subsystem '%s' already registered\n", name));
-                       return NT_STATUS_OBJECT_NAME_COLLISION;
-               }
-               t = t->next;
-       }
-
-       s = smb_xmalloc(sizeof(struct subsystem));
-
-       s->name = smb_xstrdup(name);
-       s->callback = callback;
-       s->prev = s->next = NULL;
-
-       DLIST_ADD(subsystems, s);
-
-       return NT_STATUS_OK;
-}
-
-NTSTATUS register_backend(const char *subsystem, const void *args)
-{
-       /* Find the specified subsystem */
-       struct subsystem *s = subsystems;
-
-       while(s) {
-               if(!strcmp(subsystem, s->name)) return s->callback(args);
-               s = s->next;
-       }
-       
-       DEBUG(0, ("Unable to register backend for subsystem '%s'\n", subsystem));
-
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
index 0399fc26aac6f311d1f1e66ad878502b26a26a96..77440cea0fe505ba0a7b4d14e1010ddda895f748 100644 (file)
@@ -59,21 +59,6 @@ NTSTATUS registry_register(const void *_function)
        return NT_STATUS_OK;
 }
 
-NTSTATUS registry_init(void)
-{
-       NTSTATUS status;
-       
-       status = register_subsystem("registry", registry_register);
-       if (NT_STATUS_IS_ERR(status)) {
-               DEBUG(0, ("Error registering registry subsystem: %s\n", nt_errstr(status)));
-               return status;
-       }
-
-       registry_init_static_modules;
-
-       return NT_STATUS_OK;
-}
-
 /* Find a backend in the list of available backends */
 static struct reg_init_function_entry *reg_find_backend_entry(const char *name)
 {
index 9c6ed24148e0ea41c697910aaaf2391f1f2a6efd..ec9dbec7db9d24f53eb8f3d19808479dc55a4020 100644 (file)
@@ -68,7 +68,6 @@ REQUIRED_SUBSYSTEMS = \
 ################################################
 # Start SUBSYSTEM REGISTRY
 [SUBSYSTEM::REGISTRY]
-INIT_FUNCTION = registry_init
 INIT_OBJ_FILES = \
                lib/registry/common/reg_interface.o
 ADD_OBJ_FILES = \
index 247d7232526eb8b64df82cd4fb1041492a127a5e..8712e7ce7c2c65ec836406935e97404a8f58488a 100644 (file)
@@ -144,5 +144,5 @@ static struct registry_operations reg_backend_dir = {
 
 NTSTATUS registry_dir_init(void)
 {
-       return register_backend("registry", &reg_backend_dir);
+       return registry_register(&reg_backend_dir);
 }
index 382bc6dba5a6639d99c3bf1ef649012298d800e1..fd258ca285c040c1cbbee38dedcdb2e0a783a87e 100644 (file)
@@ -189,5 +189,5 @@ static struct registry_operations reg_backend_gconf = {
 
 NTSTATUS registry_gconf_init(void)
 {
-       return register_backend("registry", &reg_backend_gconf);
+       return registry_register(&reg_backend_gconf);
 }
index 22c81018c741f1daf883612e64d1189b7572b68b..bdebe34ff4d4b6468e8479f0e7082556170c6387 100644 (file)
@@ -214,5 +214,5 @@ static struct registry_operations reg_backend_ldb = {
 
 NTSTATUS registry_ldb_init(void)
 {
-       return register_backend("registry", &reg_backend_ldb);
+       return registry_register(&reg_backend_ldb);
 }
index c1b9b43445bd4e1fcf7839368af1789b6dc2efac..aac6e548a855ea79db010f8463329f30492e08b2 100644 (file)
@@ -1743,5 +1743,5 @@ static struct registry_operations reg_backend_nt4 = {
 
 NTSTATUS registry_nt4_init(void)
 {
-       return register_backend("registry", &reg_backend_nt4);
+       return registry_register(&reg_backend_nt4);
 }
index 954e7684bbe9cf70d9114f7d62805355928869b2..47afc31d9676c02aeb6add742921706243bf1d0c 100644 (file)
@@ -401,5 +401,5 @@ static struct registry_operations reg_backend_rpc = {
 
 NTSTATUS registry_rpc_init(void)
 {
-       return register_backend("registry", &reg_backend_rpc);
+       return registry_register(&reg_backend_rpc);
 }
index 72ec882b8a65ca933b057a6c16256042cb9b2266..fb73e9052c296c006066ce4e2cb90a4fddfd9497 100644 (file)
@@ -352,5 +352,5 @@ static struct registry_operations reg_backend_w95 = {
 
 NTSTATUS registry_w95_init(void)
 {
-       return register_backend("registry", &reg_backend_w95);
+       return registry_register(&reg_backend_w95);
 }
index bfcd4624536ceab09f133561bcb8fd227a3d5103..96c2c590cb734fcdb4dd664ff586fc00f3dde7d2 100644 (file)
@@ -37,6 +37,7 @@ REQUIRED_SUBSYSTEMS = \
 ################################################
 # Start BINARY tdbtool
 [BINARY::tdbtool]
+ENABLE = NO
 OBJ_FILES= \
                lib/tdb/tools/tdbtool.o
 REQUIRED_SUBSYSTEMS = \
index 88b1081b11c23ae6b51dda655b3a04b46873fa2b..360a69c0e0359f78adc0a9594618d8940a2f7f0e 100644 (file)
@@ -751,7 +751,7 @@ NTSTATUS gensec_get_password(struct gensec_security *gensec_security,
   The 'name' can be later used by other backends to find the operations
   structure for this backend.
 */
-static NTSTATUS gensec_register(const void *_ops)
+NTSTATUS gensec_register(const void *_ops)
 {
        const struct gensec_security_ops *ops = _ops;
        
@@ -803,15 +803,6 @@ const struct gensec_critical_sizes *gensec_interface_version(void)
 */
 NTSTATUS gensec_init(void)
 {
-       NTSTATUS status = register_subsystem("gensec", gensec_register); 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       gensec_init_static_modules;
-
        gensec_dcerpc_schannel_init();
-
-       DEBUG(3,("GENSEC subsystem version %d initialised\n", GENSEC_INTERFACE_VERSION));
        return NT_STATUS_OK;
 }
index e774efe94e39d5cde6f8d6af8beef3a46d5e9277..ee8d1aa79c21188284954452f8aea864b6e26dff 100644 (file)
@@ -419,7 +419,7 @@ static const struct gensec_security_ops gensec_ntlmssp_security_ops = {
 NTSTATUS gensec_ntlmssp_init(void)
 {
        NTSTATUS ret;
-       ret = register_backend("gensec", &gensec_ntlmssp_security_ops);
+       ret = gensec_register(&gensec_ntlmssp_security_ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' gensec backend!\n",
                        gensec_ntlmssp_security_ops.name));
index ab3aff32bba8da01267b5ef07e01ea2c08180c05..bafbf64294faf5386484af2cc3522d6e8221ad41 100644 (file)
@@ -714,7 +714,7 @@ static const struct gensec_security_ops gensec_spnego_security_ops = {
 NTSTATUS gensec_spnego_init(void)
 {
        NTSTATUS ret;
-       ret = register_backend("gensec", &gensec_spnego_security_ops);
+       ret = gensec_register(&gensec_spnego_security_ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' gensec backend!\n",
                        gensec_spnego_security_ops.name));
index 1e1bdb822741c2690453dfa3b8a8b0bbdd4d68c7..4016f2d5d613ca71b7ac6fe0c27e0640f4c403e6 100644 (file)
@@ -521,7 +521,7 @@ static const struct gensec_security_ops gensec_dcerpc_schannel_security_ops = {
 NTSTATUS gensec_dcerpc_schannel_init(void)
 {
        NTSTATUS ret;
-       ret = register_backend("gensec", &gensec_dcerpc_schannel_security_ops);
+       ret = gensec_register(&gensec_dcerpc_schannel_security_ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register '%s' gensec backend!\n",
                        gensec_dcerpc_schannel_security_ops.name));
index ea169b7ee61143f0451c962652d6a79efed89c4f..bfba31b46f66fd6076e2dfd400814d1f44d7a13d 100644 (file)
@@ -872,7 +872,7 @@ NTSTATUS ntvfs_cifs_init(void)
 
        /* register ourselves with the NTVFS subsystem. We register
           under the name 'cifs'. */
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register CIFS backend!\n"));
index 14215004eaca6f6d3c993fd840d683706d1bb139..43157a8c666ee1ed199db8a14d4a7a6f5de6bf8f 100644 (file)
@@ -61,7 +61,6 @@ INIT_OBJ_FILES = \
 ################################################
 # Start SUBSYSTEM NTVFS
 [SUBSYSTEM::NTVFS]
-INIT_FUNCTION = ntvfs_init
 INIT_OBJ_FILES = \
                ntvfs/ntvfs_base.o
 ADD_OBJ_FILES = \
index 271be09ac32b0256ec495320c0b5797c8eb52589..a53accd53379ac841b9cdafc2c5b892eda2759fd 100644 (file)
@@ -756,7 +756,7 @@ NTSTATUS ntvfs_ipc_init(void)
        ops.cancel = ipc_cancel;
 
        /* register ourselves with the NTVFS subsystem. */
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register IPC backend!\n"));
index 1bcfda1371e424f51e9eb2f70e57d91dab1ea5fc..560f4a646b53ac649d4601bfb43853e49bc82974 100644 (file)
@@ -924,7 +924,7 @@ NTSTATUS ntvfs_nbench_init(void)
        ops.trans2 = NULL;
 
        /* register ourselves with the NTVFS subsystem. */
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register nbench backend!\n"));
index c168467eae00b3c06590f38c47473d9e0f12cc01..136ef14e4cc4f45a61517bdc9d72af8d4ed8daa4 100644 (file)
@@ -45,7 +45,7 @@ static int num_backends;
 
   The 'type' is used to specify whether this is for a disk, printer or IPC$ share
 */
-static NTSTATUS ntvfs_register(const void *_ops)
+NTSTATUS ntvfs_register(const void *_ops)
 {
        const struct ntvfs_ops *ops = _ops;
        struct ntvfs_ops *new_ops;
@@ -116,25 +116,6 @@ const struct ntvfs_critical_sizes *ntvfs_interface_version(void)
 }
 
 
-/*
-  initialise the NTVFS subsystem
-*/
-NTSTATUS ntvfs_init(void)
-{
-       NTSTATUS status;
-
-       status = register_subsystem("ntvfs", ntvfs_register); 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       ntvfs_init_static_modules;
-
-       DEBUG(3,("NTVFS subsystem version %d initialised\n", NTVFS_INTERFACE_VERSION));
-       return status;
-}
-
-
 /*
   initialise a connection structure to point at a NTVFS backend
 */
index 39f6717cae2ac55f2400afccce9639b63907ed1f..e5712e3e7d9d1475028c1378f87a5abcf0f07460 100644 (file)
@@ -252,10 +252,10 @@ NTSTATUS ntvfs_posix_init(void)
           under the name 'default' as we wish to be the default
           backend, and also register as 'posix' */
        ops.name = "default";
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        ops.name = "posix";
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register POSIX backend!\n"));
index 372f64e982a97732be0fb7122109c00e3a8b2239..4e2dfad0caad0133f2cc7a795ba551b837fdc14f 100644 (file)
@@ -107,7 +107,7 @@ NTSTATUS ntvfs_print_init(void)
 
        /* register ourselves with the NTVFS subsystem. We register under the name 'default'
           as we wish to be the default backend */
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register PRINT backend!\n"));
index 807f51a43daa3d34d4a39f8f4db60998be482999..57d626465a782fbf236ed841131a60e37e5bfdd6 100644 (file)
@@ -1006,7 +1006,7 @@ NTSTATUS ntvfs_simple_init(void)
 
        ops.type = NTVFS_DISK;
        ops.name = "simple";
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
 
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register simple backend with name: %s!\n",
index 7f8f8acf99848b92db728e1fbb1c8ed7e5991c60..4520df59fc19eac6a4fc7eabae504c95dbedfd05 100644 (file)
@@ -803,15 +803,15 @@ NTSTATUS ntvfs_unixuid_init(void)
 
        /* we register under all 3 backend types, as we are not type specific */
        ops.type = NTVFS_DISK;  
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) goto failed;
 
        ops.type = NTVFS_PRINT; 
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) goto failed;
 
        ops.type = NTVFS_IPC;   
-       ret = register_backend("ntvfs", &ops);
+       ret = ntvfs_register(&ops);
        if (!NT_STATUS_IS_OK(ret)) goto failed;
        
 failed:
index 4326120e57ae2e9c6948df3bf122cc7c143ff306..401d8c62fb118ac5053ad7dccbdf44ceb068dfcb 100644 (file)
@@ -190,7 +190,6 @@ REQUIRED_SUBSYSTEMS = \
 ################################################
 # Start SUBSYSTEM DCERPC
 [SUBSYSTEM::DCERPC]
-INIT_FUNCTION = dcerpc_server_init
 INIT_OBJ_FILES = \
                rpc_server/dcerpc_server.o
 ADD_OBJ_FILES = \
index 83c0872ba77acf03a570a8f1c444074ddfa463bd..67baa6281c611172a6ef7671275ecd6711b368a0 100644 (file)
@@ -1100,7 +1100,7 @@ static int num_ep_servers;
 
   The 'type' is used to specify whether this is for a disk, printer or IPC$ share
 */
-static NTSTATUS dcerpc_register_ep_server(const void *_ep_server)
+NTSTATUS dcerpc_register_ep_server(const void *_ep_server)
 {
        const struct dcesrv_endpoint_server *ep_server = _ep_server;
        
@@ -1166,24 +1166,6 @@ const struct dcesrv_critical_sizes *dcerpc_module_version(void)
        return &critical_sizes;
 }
 
-/*
-  initialise the DCERPC subsystem
-*/
-NTSTATUS dcerpc_server_init(void)
-{
-       NTSTATUS status;
-
-       status = register_subsystem("dcerpc", dcerpc_register_ep_server); 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       dcerpc_init_static_modules;
-
-       DEBUG(3,("DCERPC subsystem version %d initialised\n", DCERPC_MODULE_VERSION));
-       return NT_STATUS_OK;
-}
-
 static const struct server_service_ops dcesrv_ops = {
        .name                   = "rpc",
        .service_init           = dcesrv_init,
index ce7c9c0c23944ee84d5fe8bb2ed1ff00f20560c2..e133cb745dc5f382ab9f46cb5a8684c67809c91b 100644 (file)
@@ -75,14 +75,6 @@ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
 }
 
 
-static NTSTATUS register_dcom_class(const void *_c)
-{
-       const struct dcom_class *class = _c;
-       /* FIXME */
-
-       return NT_STATUS_NOT_SUPPORTED;
-}
-
 NTSTATUS dcerpc_server_dcom_init(void)
 {
        NTSTATUS status;
@@ -96,11 +88,6 @@ NTSTATUS dcerpc_server_dcom_init(void)
                return status;
        }
 
-       status = register_subsystem("dcom", register_dcom_class);
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
        return NT_STATUS_OK;
 }
 
index fbd6f65a1aeeb5d88f70262168006008613ee26d..957f5aa1b239dcd671e309b53302bbf9af6ae6ed 100644 (file)
@@ -200,7 +200,7 @@ NTSTATUS dcerpc_server_remote_init(void)
        ep_server.interface_by_name = remote_op_interface_by_name;
 
        /* register ourselves with the DCERPC subsystem. */
-       ret = register_backend("dcerpc", &ep_server);
+       ret = dcerpc_register_ep_server(&ep_server);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register 'remote' endpoint server!\n"));
                return ret;
index 52e8e69c30289760db965a87aeee64458849bb35..df421326d8897993a3be1c147a273b1b65ce2a9f 100644 (file)
@@ -43,7 +43,6 @@ REQUIRED_SUBSYSTEMS = \
 #######################
 # Start SUBSYSTEM SERVICE
 [SUBSYSTEM::SERVER_SERVICE]
-INIT_FUNCTION = server_service_init
 INIT_OBJ_FILES = \
                smbd/service.o
 REQUIRED_SUBSYSTEMS = \
index 69e321e0c2d791de04e6e6973f6c54484db1fa07..2a3efe2088f1f460dff456cdb2125854253f14a2 100644 (file)
@@ -54,7 +54,7 @@ static int num_models;
   The 'name' can be later used by other backends to find the operations
   structure for this backend.  
 */
-static NTSTATUS register_process_model(const void *_ops)
+NTSTATUS register_process_model(const void *_ops)
 {
        const struct model_ops *ops = _ops;
 
@@ -114,21 +114,3 @@ const struct process_model_critical_sizes *process_model_version(void)
 
        return &critical_sizes;
 }
-
-/*
-  initialise the PROCESS_MODEL subsystem
-*/
-NTSTATUS process_model_init(void)
-{
-       NTSTATUS status;
-
-       status = register_subsystem("process_model", register_process_model); 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       process_model_init_static_modules;
-
-       DEBUG(3,("PROCESS subsystem version %d initialised\n", PROCESS_MODEL_VERSION));
-       return NT_STATUS_OK; 
-}
index 70ccddd82871814145aec461f5c139639562555c..f110cbb8fafa2d7b19815408323b0a6abb09df5b 100644 (file)
@@ -34,7 +34,6 @@ REQUIRED_SUBSYSTEMS = EXT_LIB_PTHREAD
 ################################################
 # Start SUBSYSTEM PROCESS_MODEL
 [SUBSYSTEM::PROCESS_MODEL]
-INIT_FUNCTION = process_model_init
 INIT_OBJ_FILES = \
                smbd/process_model.o
 #
index 02d025b29c2454e041efe7247161a629b8577ab3..da234703030316e7ed85437f0cf123f8a425df87 100644 (file)
@@ -111,7 +111,7 @@ NTSTATUS process_model_single_init(void)
        ops.get_id                      = single_get_id;
 
        /* register ourselves with the PROCESS_MODEL subsystem. */
-       ret = register_backend("process_model", &ops);
+       ret = register_process_model(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register process_model 'single'!\n"));
                return ret;
index c794605dc58e690159774f16f384e56f82b123f9..3612c6a7f47cc14075b75bfab994c61ca08e6064 100644 (file)
@@ -148,7 +148,7 @@ NTSTATUS process_model_standard_init(void)
        ops.get_id = standard_get_id;
 
        /* register ourselves with the PROCESS_MODEL subsystem. */
-       ret = register_backend("process_model", &ops);
+       ret = register_process_model(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register process_model 'standard'!\n"));
                return ret;
index 0eead7f33cf2d24644b2d0541eb98a7153bfe284..8e8ee23aaf2d6616c5f86df13284f769db1508d1 100644 (file)
@@ -474,7 +474,7 @@ NTSTATUS process_model_thread_init(void)
        ops.get_id = thread_get_id;
 
        /* register ourselves with the PROCESS_MODEL subsystem. */
-       ret = register_backend("process_model", &ops);
+       ret = register_process_model(&ops);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(0,("Failed to register process_model 'thread'!\n"));
                return ret;
index fdbd5d0c801c7371a755fada9c20f28da39bdb8a..a15bf0105c3e525d0f05fdd3c74e26232ed74dc0 100644 (file)
@@ -313,30 +313,11 @@ const struct server_service_ops *server_service_byname(const char *name)
        return NULL;
 }
 
-static NTSTATUS register_server_service_ops(const void *_ops)
+NTSTATUS register_server_service_ops(const void *_ops)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-/*
-  initialise the SERVER SERVICE subsystem
-*/
-NTSTATUS server_service_init(void)
-{
-       NTSTATUS status;
-
-       status = register_subsystem("service", register_server_service_ops); 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       server_service_init_static_modules;
-
-       DEBUG(3,("SERVER SERVICE subsystem version %d initialised\n", SERVER_SERVICE_VERSION));
-       return NT_STATUS_OK;
-}
-
-
 /*
   close all listening sockets. This is called by process models that fork, to 
   ensure that the listen sockets from the parent are closed