1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r3737: - Get rid of the register_subsystem() and register_backend() functions.

- Re-disable tdbtool (it was building fine on my Debian box but other
					machines were having problems)
This commit is contained in:
Jelmer Vernooij 2004-11-14 22:23:23 +00:00 committed by Gerald (Jerry) Carter
parent 359a3570f3
commit 0d7bb2c40b
47 changed files with 41 additions and 418 deletions

View 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;

View 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));

View 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));

View 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));

View 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 = \

View 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";
}

View 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\"));

View 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 "";
}

View 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
#

View 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 \

View 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;
}

View 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

View 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;

View File

@ -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;
}

View 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)
{

View 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 = \

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View File

@ -37,6 +37,7 @@ REQUIRED_SUBSYSTEMS = \
################################################
# Start BINARY tdbtool
[BINARY::tdbtool]
ENABLE = NO
OBJ_FILES= \
lib/tdb/tools/tdbtool.o
REQUIRED_SUBSYSTEMS = \

View 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;
}

View 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));

View 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));

View 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));

View 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"));

View 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 = \

View 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"));

View 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"));

View 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
*/

View 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"));

View 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"));

View 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",

View 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:

View 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 = \

View 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,

View 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;
}

View 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;

View 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 = \

View 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;
}

View 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
#

View 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;

View 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;

View 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;

View 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