summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/param/loadparm.c12
-rw-r--r--source3/smbd/server.c2
3 files changed, 14 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1989fb1a86..6e14c33272 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3419,6 +3419,7 @@ bool lp_dos_filetimes(int );
bool lp_dos_filetime_resolution(int );
bool lp_fake_dir_create_times(int);
bool lp_async_smb_echo_handler(void);
+bool lp_multicast_dns_register(void);
bool lp_blocking_locks(int );
bool lp_inherit_perms(int );
bool lp_inherit_acls(int );
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 1d3c7353ed..f65682fbed 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -374,6 +374,7 @@ struct global {
char *szSMBPerfcountModule;
bool bMapUntrustedToDomain;
bool bAsyncSMBEchoHandler;
+ bool bMulticastDnsRegister;
int ismb2_max_read;
int ismb2_max_write;
int ismb2_max_trans;
@@ -4409,6 +4410,15 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED | FLAG_GLOBAL,
},
{
+ .label = "multicast dns register",
+ .type = P_BOOL,
+ .p_class = P_GLOBAL,
+ .ptr = &Globals.bMulticastDnsRegister,
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED | FLAG_GLOBAL,
+ },
+ {
.label = "panic action",
.type = P_STRING,
.p_class = P_GLOBAL,
@@ -5372,6 +5382,7 @@ static void init_globals(bool reinit_globals)
Globals.iminreceivefile = 0;
Globals.bMapUntrustedToDomain = false;
+ Globals.bMulticastDnsRegister = true;
Globals.ismb2_max_read = 1024*1024;
Globals.ismb2_max_write = 1024*1024;
@@ -5857,6 +5868,7 @@ FN_LOCAL_BOOL(lp_dos_filetimes, bDosFiletimes)
FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution)
FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes)
FN_GLOBAL_BOOL(lp_async_smb_echo_handler, &Globals.bAsyncSMBEchoHandler)
+FN_GLOBAL_BOOL(lp_multicast_dns_register, &Globals.bMulticastDnsRegister)
FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks)
FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms)
FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS)
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index dd3ae3a730..c30b344e45 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -739,7 +739,7 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
msg_inject_fault);
#endif
- if (dns_port != 0) {
+ if (lp_multicast_dns_register() && (dns_port != 0)) {
#ifdef WITH_DNSSD_SUPPORT
smbd_setup_mdns_registration(smbd_event_context(),
parent, dns_port);