summaryrefslogtreecommitdiff
path: root/source4/nbt_server/nbt_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/nbt_server.c')
-rw-r--r--source4/nbt_server/nbt_server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index d8f6a83e94..a2b95d76c4 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -27,6 +27,8 @@
#include "nbt_server/wins/winsserver.h"
#include "system/network.h"
#include "lib/socket/netif.h"
+#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
/*
startup the nbtd task
@@ -61,6 +63,12 @@ static void nbtd_task_init(struct task_server *task)
return;
}
+ nbtsrv->sam_ctx = samdb_connect(nbtsrv, anonymous_session(nbtsrv));
+ if (nbtsrv->sam_ctx == NULL) {
+ task_server_terminate(task, "nbtd failed to open samdb");
+ return;
+ }
+
/* start the WINS server, if appropriate */
status = nbtd_winsserver_init(nbtsrv);
if (!NT_STATUS_IS_OK(status)) {
@@ -74,6 +82,8 @@ static void nbtd_task_init(struct task_server *task)
nbtd_register_names(nbtsrv);
irpc_add_name(task->msg_ctx, "nbt_server");
+
+
}