s4:schannel merge code with s3
[ira/wip.git] / source4 / smbd / server.c
index 99e9c68a87de4b8b9d7c51bcf29b3d9550cb6811..83f6e7d8063c660f68297abfdba024c39101b002 100644 (file)
@@ -31,7 +31,6 @@
 #include "ntvfs/ntvfs.h"
 #include "ntptr/ntptr.h"
 #include "auth/gensec/gensec.h"
-#include "auth/gensec/schannel_state.h"
 #include "smbd/process_model.h"
 #include "param/secrets.h"
 #include "smbd/pidfile.h"
@@ -141,7 +140,7 @@ static void setup_signals(void)
 #endif
 
        /* POSIX demands that signals are inherited. If the invoking process has
-        * these signals masked, we will have problems, as we won't recieve them. */
+        * these signals masked, we will have problems, as we won't receive them. */
        BlockSignals(false, SIGHUP);
        BlockSignals(false, SIGTERM);
 
@@ -192,7 +191,6 @@ static void prime_ldb_databases(struct tevent_context *event_ctx)
 
        samdb_connect(db_context, event_ctx, cmdline_lp_ctx, system_session(cmdline_lp_ctx));
        privilege_connect(db_context, event_ctx, cmdline_lp_ctx);
-       schannel_db_connect(db_context, event_ctx, cmdline_lp_ctx);
 
        /* we deliberately leave these open, which allows them to be
         * re-used in ldb_wrap_connect() */
@@ -256,6 +254,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
        extern NTSTATUS server_service_smb_init(void);
        extern NTSTATUS server_service_drepl_init(void);
        extern NTSTATUS server_service_kcc_init(void);
+       extern NTSTATUS server_service_dnsupdate_init(void);
        extern NTSTATUS server_service_rpc_init(void);
        extern NTSTATUS server_service_ntp_signd_init(void);
        extern NTSTATUS server_service_samba3_smb_init(void);
@@ -302,7 +301,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
                        fprintf(stderr, "\nInvalid option %s: %s\n\n",
                                  poptBadOption(pc, 0), poptStrerror(opt));
                        poptPrintUsage(pc, stderr, 0);
-                       exit(1);
+                       return 1;
                }
        }
 
@@ -310,7 +309,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
                fprintf(stderr,"\nERROR: "
                          "Option -i|--interactive is not allowed together with -D|--daemon\n\n");
                poptPrintUsage(pc, stderr, 0);
-               exit(1);
+               return 1;
        } else if (!opt_interactive) {
                /* default is --daemon */
                opt_daemon = true;
@@ -332,7 +331,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
                DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
                DEBUGADD(0,("sizeof(uint16_t) = %u, sizeof(uint32_t) %u, sizeof(uint64_t) = %u\n",
                            (unsigned int)sizeof(uint16_t), (unsigned int)sizeof(uint32_t), (unsigned int)sizeof(uint64_t)));
-               exit(1);
+               return 1;
        }
 
        if (opt_daemon) {
@@ -352,7 +351,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
         * passdb/secrets.c, and proved that Samba still builds... */
        /* Setup the SECRETS subsystem */
        if (secrets_init(talloc_autofree_context(), cmdline_lp_ctx) == NULL) {
-               exit(1);
+               return 1;
        }
 
        gensec_init(cmdline_lp_ctx); /* FIXME: */