lib/util Rename load_samba_modules -> samba_modules_load
[mat/samba.git] / source4 / smbd / server.c
index 1be3b2885f6424df23f9ebd0aa49124bcce78872..e925dd4e3f915abe4d5fa5e65927b84d6599f5a1 100644 (file)
@@ -42,6 +42,7 @@
 #include "librpc/gen_ndr/ndr_irpc.h"
 #include "cluster/cluster.h"
 #include "dynconfig/dynconfig.h"
+#include "lib/util/samba_modules.h"
 
 /*
   recursively delete a directory tree
@@ -220,8 +221,8 @@ static NTSTATUS setup_parent_messaging(struct tevent_context *event_ctx,
        NTSTATUS status;
 
        msg = imessaging_init(talloc_autofree_context(),
-                            lpcfg_imessaging_path(event_ctx, lp_ctx),
-                            cluster_id(0, SAMBA_PARENT_TASKID), event_ctx);
+                             lp_ctx,
+                             cluster_id(0, SAMBA_PARENT_TASKID), event_ctx, false);
        NT_STATUS_HAVE_NO_MEMORY(msg);
 
        irpc_add_name(msg, "samba");
@@ -252,6 +253,8 @@ static void show_build(void)
                CONFIG_OPTION(DATADIR),
                CONFIG_OPTION(MODULESDIR),
                CONFIG_OPTION(LOCKDIR),
+               CONFIG_OPTION(STATEDIR),
+               CONFIG_OPTION(CACHEDIR),
                CONFIG_OPTION(PIDDIR),
                CONFIG_OPTION(PRIVATE_DIR),
                CONFIG_OPTION(SWATDIR),
@@ -289,8 +292,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
        poptContext pc;
 #define _MODULE_PROTO(init) extern NTSTATUS init(void);
        STATIC_service_MODULES_PROTO;
-       init_module_fn static_init[] = { STATIC_service_MODULES };
-       init_module_fn *shared_init;
+       samba_init_module_fn static_init[] = { STATIC_service_MODULES };
+       samba_init_module_fn *shared_init;
        struct tevent_context *event_ctx;
        uint16_t stdin_event_flags;
        NTSTATUS status;
@@ -390,7 +393,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
        }
 
        if (lpcfg_server_role(cmdline_lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
-               if (!open_schannel_session_store(talloc_autofree_context(), lpcfg_private_dir(cmdline_lp_ctx))) {
+               if (!open_schannel_session_store(talloc_autofree_context(), cmdline_lp_ctx)) {
                        DEBUG(0,("ERROR: Samba cannot open schannel store for secured NETLOGON operations.\n"));
                        exit(1);
                }
@@ -406,10 +409,10 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
 
        process_model_init(cmdline_lp_ctx); 
 
-       shared_init = load_samba_modules(NULL, "service");
+       shared_init = samba_modules_load(NULL, "service");
 
-       run_init_functions(static_init);
-       run_init_functions(shared_init);
+       samba_init_module_fns_run(static_init);
+       samba_init_module_fns_run(shared_init);
 
        talloc_free(shared_init);