summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/resolve/resolve_lp.c8
-rw-r--r--source4/nbt_server/nbt_server.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/source4/libcli/resolve/resolve_lp.c b/source4/libcli/resolve/resolve_lp.c
index 69c05a2ea0..92e11f0fcb 100644
--- a/source4/libcli/resolve/resolve_lp.c
+++ b/source4/libcli/resolve/resolve_lp.c
@@ -32,9 +32,13 @@ struct resolve_context *lpcfg_resolve_context(struct loadparm_context *lp_ctx)
for (i = 0; methods != NULL && methods[i] != NULL; i++) {
if (!strcmp(methods[i], "wins")) {
- resolve_context_add_wins_method_lp(ret, lp_ctx);
+ if (lpcfg_disable_netbios(lp_ctx) == false) {
+ resolve_context_add_wins_method_lp(ret, lp_ctx);
+ }
} else if (!strcmp(methods[i], "bcast")) {
- resolve_context_add_bcast_method_lp(ret, lp_ctx);
+ if (lpcfg_disable_netbios(lp_ctx) == false) {
+ resolve_context_add_bcast_method_lp(ret, lp_ctx);
+ }
} else if (!strcmp(methods[i], "file")) {
resolve_context_add_file_method_lp(ret, lp_ctx);
} else if (!strcmp(methods[i], "host")) {
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index 175ad5e4a4..232fb9de13 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -48,6 +48,11 @@ static void nbtd_task_init(struct task_server *task)
return;
}
+ if (lpcfg_disable_netbios(task->lp_ctx)) {
+ task_server_terminate(task, "nbtd: 'disable netbios = yes' set in smb.conf, shutting down nbt server", false);
+ return;
+ }
+
task_server_set_title(task, "task[nbtd]");
nbtsrv = talloc(task, struct nbtd_server);