The branch, v3-6-test has been updated
       via  169a637 s3: Allow disabling of mdns registrations
      from  e5226a3 librpc/ndr: use new strlen_m_ext_term() in 
ndr_charset_length(): fix bug #7594

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 169a637a4a3c441aae710f63074106c96e540324
Author: Volker Lendecke <[email protected]>
Date:   Fri Nov 5 11:41:09 2010 +0100

    s3: Allow disabling of mdns registrations
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Fri Nov  5 11:24:41 UTC 2010 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/smbdotconf/base/multicastdnsregister.xml |   15 +++++++++++++++
 source3/include/proto.h                           |    1 +
 source3/param/loadparm.c                          |   12 ++++++++++++
 source3/smbd/server.c                             |    2 +-
 4 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 docs-xml/smbdotconf/base/multicastdnsregister.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/base/multicastdnsregister.xml 
b/docs-xml/smbdotconf/base/multicastdnsregister.xml
new file mode 100644
index 0000000..32d9cfc
--- /dev/null
+++ b/docs-xml/smbdotconf/base/multicastdnsregister.xml
@@ -0,0 +1,15 @@
+<samba:parameter name="multicast dns register"
+                               type="boolean"
+                 context="G"
+                 advanced="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";>
+<description>
+        <para>If compiled with proper support for it, Samba will
+        announce itself with multicast DNS services like for example
+        provided by the Avahi daemon.</para>
+
+       <para>This parameter allows disabling Samba to register
+       itself.</para>
+</description>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 58abc58..010c3d1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3530,6 +3530,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 ebfe4ca..1552fae 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -371,6 +371,7 @@ struct global {
        char *szSMBPerfcountModule;
        bool bMapUntrustedToDomain;
        bool bAsyncSMBEchoHandler;
+       bool bMulticastDnsRegister;
        int ismb2_max_read;
        int ismb2_max_write;
        int ismb2_max_trans;
@@ -4413,6 +4414,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,
@@ -5291,6 +5301,7 @@ static void init_globals(bool first_time_only)
        Globals.iminreceivefile = 0;
 
        Globals.bMapUntrustedToDomain = false;
+       Globals.bMulticastDnsRegister = true;
 
        Globals.ismb2_max_read = 1024*1024;
        Globals.ismb2_max_write = 1024*1024;
@@ -5774,6 +5785,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 b052a9a..04f0bc0 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -703,7 +703,7 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
                           MSG_SMB_INJECT_FAULT, 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);


-- 
Samba Shared Repository

Reply via email to