param: Remove "announce as" parameter
authorAndrew Bartlett <abartlet@samba.org>
Tue, 21 Jun 2011 00:20:05 +0000 (10:20 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 23 Jun 2011 11:47:27 +0000 (13:47 +0200)
docs-xml/smbdotconf/protocol/announceas.xml [deleted file]
source3/param/loadparm.c
source4/param/loadparm.c
source4/param/param.h
source4/rpc_server/common/server_info.c

diff --git a/docs-xml/smbdotconf/protocol/announceas.xml b/docs-xml/smbdotconf/protocol/announceas.xml
deleted file mode 100644 (file)
index 8891496..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<samba:parameter name="announce as"
-                 context="G"
-                                type="string"
-                 developer="1"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
-<description>
-    <para>This specifies what type of server <citerefentry><refentrytitle>nmbd</refentrytitle>
-    <manvolnum>8</manvolnum></citerefentry> will announce itself as, to a network neighborhood browse 
-    list. By default this is set to Windows NT. The valid options 
-    are : &quot;NT Server&quot; (which can also be written as &quot;NT&quot;), 
-    &quot;NT Workstation&quot;, &quot;Win95&quot; or &quot;WfW&quot; meaning Windows NT Server, 
-    Windows NT Workstation, Windows 95 and Windows for Workgroups 
-    respectively. Do not change this parameter unless you have a 
-    specific need to stop Samba appearing as an NT server as this 
-    may prevent Samba servers from participating as browser servers 
-       correctly.</para>
-</description>
-
-<value type="default">NT Server</value>
-<value type="example">Win95</value>
-</samba:parameter>
index 18fdc75..e03a614 100644 (file)
@@ -260,7 +260,6 @@ struct global {
        int min_wins_ttl;
        int lm_announce;
        int lm_interval;
-       int announce_as;        /* This is initialised in init_globals */
        int machine_password_timeout;
        int map_to_guest;
        int oplock_break_wait_time;
@@ -798,21 +797,6 @@ static const struct enum_list enum_ldap_passwd_sync[] = {
        {-1, NULL}
 };
 
-/* Types of machine we can announce as. */
-#define ANNOUNCE_AS_NT_SERVER 1
-#define ANNOUNCE_AS_WIN95 2
-#define ANNOUNCE_AS_WFW 3
-#define ANNOUNCE_AS_NT_WORKSTATION 4
-
-static const struct enum_list enum_announce_as[] = {
-       {ANNOUNCE_AS_NT_SERVER, "NT"},
-       {ANNOUNCE_AS_NT_SERVER, "NT Server"},
-       {ANNOUNCE_AS_NT_WORKSTATION, "NT Workstation"},
-       {ANNOUNCE_AS_WIN95, "win95"},
-       {ANNOUNCE_AS_WFW, "WfW"},
-       {-1, NULL}
-};
-
 static const struct enum_list enum_map_readonly[] = {
        {MAP_READONLY_NO, "no"},
        {MAP_READONLY_NO, "false"},
@@ -2177,15 +2161,6 @@ static struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-       {
-               .label          = "announce as",
-               .type           = P_ENUM,
-               .p_class        = P_GLOBAL,
-               .ptr            = &Globals.announce_as,
-               .special        = NULL,
-               .enum_list      = enum_announce_as,
-               .flags          = FLAG_ADVANCED,
-       },
        {
                .label          = "map acl inherit",
                .type           = P_BOOL,
@@ -5273,7 +5248,6 @@ static void init_globals(bool reinit_globals)
        Globals.machine_password_timeout = 60 * 60 * 24 * 7;    /* 7 days default. */
        Globals.lm_announce = 2;        /* = Auto: send only if LM clients found */
        Globals.lm_interval = 60;
-       Globals.announce_as = ANNOUNCE_AS_NT_SERVER;
 #if (defined(HAVE_NETGROUP) && defined(WITH_AUTOMOUNT))
        Globals.bNISHomeMap = False;
 #ifdef WITH_NISPLUS_HOME
@@ -5836,7 +5810,6 @@ FN_GLOBAL_INTEGER(lp_lpqcachetime, lpqcachetime)
 FN_GLOBAL_INTEGER(lp_max_smbd_processes, iMaxSmbdProcesses)
 FN_GLOBAL_BOOL(_lp_disable_spoolss, bDisableSpoolss)
 FN_GLOBAL_INTEGER(lp_syslog, syslog)
-static FN_GLOBAL_INTEGER(lp_announce_as, announce_as)
 FN_GLOBAL_INTEGER(lp_lm_announce, lm_announce)
 FN_GLOBAL_INTEGER(lp_lm_interval, lm_interval)
 FN_GLOBAL_INTEGER(lp_machine_password_timeout, machine_password_timeout)
@@ -9800,22 +9773,8 @@ static void set_default_server_announce_type(void)
 
        default_server_announce |= SV_TYPE_PRINTQ_SERVER;
 
-       switch (lp_announce_as()) {
-               case ANNOUNCE_AS_NT_SERVER:
-                       default_server_announce |= SV_TYPE_SERVER_NT;
-                       /* fall through... */
-               case ANNOUNCE_AS_NT_WORKSTATION:
-                       default_server_announce |= SV_TYPE_NT;
-                       break;
-               case ANNOUNCE_AS_WIN95:
-                       default_server_announce |= SV_TYPE_WIN95_PLUS;
-                       break;
-               case ANNOUNCE_AS_WFW:
-                       default_server_announce |= SV_TYPE_WFW;
-                       break;
-               default:
-                       break;
-       }
+       default_server_announce |= SV_TYPE_SERVER_NT;
+       default_server_announce |= SV_TYPE_NT;
 
        switch (lp_server_role()) {
                case ROLE_DOMAIN_MEMBER:
index 4ad5556..14285be 100644 (file)
@@ -135,15 +135,6 @@ static const struct enum_list enum_security[] = {
        {-1, NULL}
 };
 
-static const struct enum_list enum_announce_as[] = {
-       {ANNOUNCE_AS_NT_SERVER, "NT"},
-       {ANNOUNCE_AS_NT_SERVER, "NT Server"},
-       {ANNOUNCE_AS_NT_WORKSTATION, "NT Workstation"},
-       {ANNOUNCE_AS_WIN95, "win95"},
-       {ANNOUNCE_AS_WFW, "WfW"},
-       {-1, NULL}
-};
-
 static const struct enum_list enum_bool_auto[] = {
        {false, "No"},
        {false, "False"},
@@ -283,7 +274,6 @@ static struct parm_struct parm_table[] = {
        {"nt status support", P_BOOL, P_GLOBAL, GLOBAL_VAR(bNTStatusSupport), NULL, NULL},
 
        {"announce version", P_STRING, P_GLOBAL, GLOBAL_VAR(szAnnounceVersion), NULL, NULL},
-       {"announce as", P_ENUM, P_GLOBAL, GLOBAL_VAR(announce_as), NULL, enum_announce_as},
        {"max mux", P_INTEGER, P_GLOBAL, GLOBAL_VAR(max_mux), NULL, NULL},
        {"max xmit", P_BYTES, P_GLOBAL, GLOBAL_VAR(max_xmit), NULL, NULL},
 
@@ -629,7 +619,6 @@ FN_GLOBAL_INTEGER(cli_maxprotocol, cli_maxprotocol)
 FN_GLOBAL_INTEGER(cli_minprotocol, cli_minprotocol)
 FN_GLOBAL_INTEGER(security, security)
 FN_GLOBAL_BOOL(paranoid_server_security, paranoid_server_security)
-FN_GLOBAL_INTEGER(announce_as, announce_as)
 
 FN_LOCAL_STRING(pathname, szPath)
 FN_LOCAL_LIST(hostsallow, szHostsallow)
index 4ba9d49..ebf41f7 100644 (file)
@@ -49,13 +49,6 @@ typedef NTSTATUS (*init_module_fn) (void);
 
 #include "libds/common/roles.h"
 
-enum announce_as {/* Types of machine we can announce as. */
-       ANNOUNCE_AS_NT_SERVER=1,
-       ANNOUNCE_AS_WIN95=2,
-       ANNOUNCE_AS_WFW=3,
-       ANNOUNCE_AS_NT_WORKSTATION=4
-};
-
 struct loadparm_context;
 struct loadparm_service;
 struct smbcli_options;
index 7f533ec..68985d8 100644 (file)
@@ -68,22 +68,8 @@ uint32_t dcesrv_common_get_server_type(TALLOC_CTX *mem_ctx, struct tevent_contex
        default_server_announce |= SV_TYPE_SERVER;
        default_server_announce |= SV_TYPE_SERVER_UNIX;
 
-       switch (lpcfg_announce_as(dce_ctx->lp_ctx)) {
-               case ANNOUNCE_AS_NT_SERVER:
-                       default_server_announce |= SV_TYPE_SERVER_NT;
-                       /* fall through... */
-               case ANNOUNCE_AS_NT_WORKSTATION:
-                       default_server_announce |= SV_TYPE_NT;
-                       break;
-               case ANNOUNCE_AS_WIN95:
-                       default_server_announce |= SV_TYPE_WIN95_PLUS;
-                       break;
-               case ANNOUNCE_AS_WFW:
-                       default_server_announce |= SV_TYPE_WFW;
-                       break;
-               default:
-                       break;
-       }
+       default_server_announce |= SV_TYPE_SERVER_NT;
+       default_server_announce |= SV_TYPE_NT;
 
        switch (lpcfg_server_role(dce_ctx->lp_ctx)) {
                case ROLE_DOMAIN_MEMBER: