mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3-param Remove 'announce version' parameter
The only users I can find of this on the internet involve confused users, and our own documentation recommends never setting this. Don't confuse our users any longer. Andrew Bartlett
This commit is contained in:
parent
38b5beb33d
commit
734e1b6812
@ -1,14 +0,0 @@
|
||||
<samba:parameter name="announce version"
|
||||
context="G"
|
||||
developer="1"
|
||||
type="string"
|
||||
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
|
||||
<description>
|
||||
<para>This specifies the major and minor version numbers
|
||||
that nmbd will use when announcing itself as a server. The default
|
||||
is 4.9. Do not change this parameter unless you have a specific
|
||||
need to set a Samba server to be a downlevel server.</para>
|
||||
</description>
|
||||
<value type="default">4.9</value>
|
||||
<value type="example">2.0</value>
|
||||
</samba:parameter>
|
@ -1636,8 +1636,6 @@ bool lp_preferred_master(void);
|
||||
void lp_remove_service(int snum);
|
||||
void lp_copy_service(int snum, const char *new_name);
|
||||
int lp_default_server_announce(void);
|
||||
int lp_major_announce_version(void);
|
||||
int lp_minor_announce_version(void);
|
||||
void lp_set_name_resolve_order(const char *new_order);
|
||||
const char *lp_printername(int snum);
|
||||
void lp_set_logfile(const char *name);
|
||||
|
@ -1236,8 +1236,8 @@ char *strdup(char *s);
|
||||
* This may change again in Samba-3.0 after further testing. JHT
|
||||
*/
|
||||
|
||||
#define DEFAULT_MAJOR_VERSION 0x04
|
||||
#define DEFAULT_MINOR_VERSION 0x09
|
||||
#define SAMBA_MAJOR_NBT_ANNOUNCE_VERSION 0x04
|
||||
#define SAMBA_MINOR_NBT_ANNOUNCE_VERSION 0x09
|
||||
|
||||
/* Browser Election Values */
|
||||
#define BROWSER_ELECTION_VERSION 0x010f
|
||||
|
@ -37,8 +37,8 @@ static WERROR NetServerGetInfo_l_101(struct libnetapi_ctx *ctx,
|
||||
|
||||
i.sv101_platform_id = PLATFORM_ID_NT;
|
||||
i.sv101_name = lp_netbios_name();
|
||||
i.sv101_version_major = lp_major_announce_version();
|
||||
i.sv101_version_minor = lp_minor_announce_version();
|
||||
i.sv101_version_major = SAMBA_MAJOR_NBT_ANNOUNCE_VERSION;
|
||||
i.sv101_version_minor = SAMBA_MINOR_NBT_ANNOUNCE_VERSION;
|
||||
i.sv101_type = lp_default_server_announce();
|
||||
i.sv101_comment = lp_serverstring();
|
||||
|
||||
|
@ -109,8 +109,8 @@ static void send_announcement(struct subnet_record *subrec, int announce_type,
|
||||
strupper_m(upper_server_name);
|
||||
push_string_check(p+5, upper_server_name, 16, STR_ASCII|STR_TERMINATE);
|
||||
|
||||
SCVAL(p,21,lp_major_announce_version()); /* Major version. */
|
||||
SCVAL(p,22,lp_minor_announce_version()); /* Minor version. */
|
||||
SCVAL(p,21,SAMBA_MAJOR_NBT_ANNOUNCE_VERSION); /* Major version. */
|
||||
SCVAL(p,22,SAMBA_MINOR_NBT_ANNOUNCE_VERSION); /* Minor version. */
|
||||
|
||||
SIVAL(p,23,server_type & ~SV_TYPE_LOCAL_LIST_ONLY);
|
||||
/* Browse version: got from NT/AS 4.00 - Value defined in smb.h (JHT). */
|
||||
@ -140,8 +140,8 @@ static void send_lm_announcement(struct subnet_record *subrec, int announce_type
|
||||
|
||||
SSVAL(p,0,announce_type);
|
||||
SIVAL(p,2,server_type & ~SV_TYPE_LOCAL_LIST_ONLY);
|
||||
SCVAL(p,6,lp_major_announce_version()); /* Major version. */
|
||||
SCVAL(p,7,lp_minor_announce_version()); /* Minor version. */
|
||||
SCVAL(p,6,SAMBA_MAJOR_NBT_ANNOUNCE_VERSION); /* Major version. */
|
||||
SCVAL(p,7,SAMBA_MINOR_NBT_ANNOUNCE_VERSION); /* Minor version. */
|
||||
SSVAL(p,8,announce_interval); /* In seconds - according to spec. */
|
||||
|
||||
p += 10;
|
||||
|
@ -175,7 +175,6 @@ struct global {
|
||||
char *szSocketAddress;
|
||||
bool bNmbdBindExplicitBroadcast;
|
||||
char *szNISHomeMapName;
|
||||
char *szAnnounceVersion; /* This is initialised in init_globals */
|
||||
char *szWorkgroup;
|
||||
char *szNetbiosName;
|
||||
char **szNetbiosAliases;
|
||||
@ -2152,15 +2151,6 @@ static struct parm_struct parm_table[] = {
|
||||
.enum_list = NULL,
|
||||
.flags = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
|
||||
},
|
||||
{
|
||||
.label = "announce version",
|
||||
.type = P_STRING,
|
||||
.p_class = P_GLOBAL,
|
||||
.ptr = &Globals.szAnnounceVersion,
|
||||
.special = NULL,
|
||||
.enum_list = NULL,
|
||||
.flags = FLAG_ADVANCED,
|
||||
},
|
||||
{
|
||||
.label = "map acl inherit",
|
||||
.type = P_BOOL,
|
||||
@ -5178,12 +5168,6 @@ static void init_globals(bool reinit_globals)
|
||||
}
|
||||
string_set(&Globals.szServerString, s);
|
||||
SAFE_FREE(s);
|
||||
if (asprintf(&s, "%d.%d", DEFAULT_MAJOR_VERSION,
|
||||
DEFAULT_MINOR_VERSION) < 0) {
|
||||
smb_panic("init_globals: ENOMEM");
|
||||
}
|
||||
string_set(&Globals.szAnnounceVersion, s);
|
||||
SAFE_FREE(s);
|
||||
#ifdef DEVELOPER
|
||||
string_set(&Globals.szPanicAction, "/bin/sleep 999999999");
|
||||
#endif
|
||||
@ -5581,7 +5565,6 @@ FN_GLOBAL_BOOL(lp_nmbd_bind_explicit_broadcast, bNmbdBindExplicitBroadcast)
|
||||
FN_GLOBAL_LIST(lp_wins_server_list, szWINSservers)
|
||||
FN_GLOBAL_LIST(lp_interfaces, szInterfaces)
|
||||
FN_GLOBAL_STRING(lp_nis_home_map_name, szNISHomeMapName)
|
||||
static FN_GLOBAL_STRING(lp_announce_version, szAnnounceVersion)
|
||||
FN_GLOBAL_LIST(lp_netbios_aliases, szNetbiosAliases)
|
||||
/* FN_GLOBAL_STRING(lp_passdb_backend, szPassdbBackend)
|
||||
* lp_passdb_backend() should be replace by the this macro again after
|
||||
@ -9867,54 +9850,6 @@ int lp_default_server_announce(void)
|
||||
return default_server_announce;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Split the announce version into major and minor numbers.
|
||||
********************************************************************/
|
||||
|
||||
int lp_major_announce_version(void)
|
||||
{
|
||||
static bool got_major = False;
|
||||
static int major_version = DEFAULT_MAJOR_VERSION;
|
||||
char *vers;
|
||||
char *p;
|
||||
|
||||
if (got_major)
|
||||
return major_version;
|
||||
|
||||
got_major = True;
|
||||
if ((vers = lp_announce_version()) == NULL)
|
||||
return major_version;
|
||||
|
||||
if ((p = strchr_m(vers, '.')) == 0)
|
||||
return major_version;
|
||||
|
||||
*p = '\0';
|
||||
major_version = atoi(vers);
|
||||
return major_version;
|
||||
}
|
||||
|
||||
int lp_minor_announce_version(void)
|
||||
{
|
||||
static bool got_minor = False;
|
||||
static int minor_version = DEFAULT_MINOR_VERSION;
|
||||
char *vers;
|
||||
char *p;
|
||||
|
||||
if (got_minor)
|
||||
return minor_version;
|
||||
|
||||
got_minor = True;
|
||||
if ((vers = lp_announce_version()) == NULL)
|
||||
return minor_version;
|
||||
|
||||
if ((p = strchr_m(vers, '.')) == 0)
|
||||
return minor_version;
|
||||
|
||||
p++;
|
||||
minor_version = atoi(p);
|
||||
return minor_version;
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
Set the global name resolution order (used in smbclient).
|
||||
************************************************************/
|
||||
|
@ -58,8 +58,8 @@ static int current_version_fetch_values(const char *key, struct regval_ctr *valu
|
||||
|
||||
regval_ctr_addvalue_sz(values, "SystemRoot", sysroot_string);
|
||||
|
||||
fstr_sprintf(sysversion, "%d.%d", lp_major_announce_version(),
|
||||
lp_minor_announce_version());
|
||||
fstr_sprintf(sysversion, "%d.%d", SAMBA_MAJOR_NBT_ANNOUNCE_VERSION,
|
||||
SAMBA_MINOR_NBT_ANNOUNCE_VERSION);
|
||||
|
||||
regval_ctr_addvalue_sz(values, "CurrentVersion", sysversion);
|
||||
|
||||
|
@ -1146,8 +1146,8 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
|
||||
|
||||
info102->platform_id = PLATFORM_ID_NT;
|
||||
info102->server_name = lp_netbios_name();
|
||||
info102->version_major = lp_major_announce_version();
|
||||
info102->version_minor = lp_minor_announce_version();
|
||||
info102->version_major = SAMBA_MAJOR_NBT_ANNOUNCE_VERSION;
|
||||
info102->version_minor = SAMBA_MINOR_NBT_ANNOUNCE_VERSION;
|
||||
info102->server_type = lp_default_server_announce();
|
||||
info102->comment = string_truncate(lp_serverstring(),
|
||||
MAX_SERVER_STRING_LENGTH);
|
||||
@ -1172,8 +1172,8 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
|
||||
|
||||
info101->platform_id = PLATFORM_ID_NT;
|
||||
info101->server_name = lp_netbios_name();
|
||||
info101->version_major = lp_major_announce_version();
|
||||
info101->version_minor = lp_minor_announce_version();
|
||||
info101->version_major = SAMBA_MAJOR_NBT_ANNOUNCE_VERSION;
|
||||
info101->version_minor = SAMBA_MINOR_NBT_ANNOUNCE_VERSION;
|
||||
info101->server_type = lp_default_server_announce();
|
||||
info101->comment = string_truncate(lp_serverstring(),
|
||||
MAX_SERVER_STRING_LENGTH);
|
||||
|
@ -260,8 +260,8 @@ static struct wkssvc_NetWkstaInfo100 *create_wks_info_100(TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
|
||||
info100->platform_id = PLATFORM_ID_NT; /* unknown */
|
||||
info100->version_major = lp_major_announce_version();
|
||||
info100->version_minor = lp_minor_announce_version();
|
||||
info100->version_major = SAMBA_MAJOR_NBT_ANNOUNCE_VERSION;
|
||||
info100->version_minor = SAMBA_MINOR_NBT_ANNOUNCE_VERSION;
|
||||
|
||||
info100->server_name = talloc_asprintf_strupper_m(
|
||||
info100, "%s", lp_netbios_name());
|
||||
@ -289,8 +289,8 @@ static struct wkssvc_NetWkstaInfo101 *create_wks_info_101(TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
|
||||
info101->platform_id = PLATFORM_ID_NT; /* unknown */
|
||||
info101->version_major = lp_major_announce_version();
|
||||
info101->version_minor = lp_minor_announce_version();
|
||||
info101->version_major = SAMBA_MAJOR_NBT_ANNOUNCE_VERSION;
|
||||
info101->version_minor = SAMBA_MINOR_NBT_ANNOUNCE_VERSION;
|
||||
|
||||
info101->server_name = talloc_asprintf_strupper_m(
|
||||
info101, "%s", lp_netbios_name());
|
||||
@ -320,8 +320,8 @@ static struct wkssvc_NetWkstaInfo102 *create_wks_info_102(TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
|
||||
info102->platform_id = PLATFORM_ID_NT; /* unknown */
|
||||
info102->version_major = lp_major_announce_version();
|
||||
info102->version_minor = lp_minor_announce_version();
|
||||
info102->version_major = SAMBA_MAJOR_NBT_ANNOUNCE_VERSION;
|
||||
info102->version_minor = SAMBA_MINOR_NBT_ANNOUNCE_VERSION;
|
||||
|
||||
info102->server_name = talloc_asprintf_strupper_m(
|
||||
info102, "%s", lp_netbios_name());
|
||||
|
@ -4027,8 +4027,8 @@ static bool api_NetWkstaGetInfo(struct smbd_server_connection *sconn,
|
||||
}
|
||||
p += 4;
|
||||
|
||||
SCVAL(p,0,lp_major_announce_version()); /* system version - e.g 4 in 4.1 */
|
||||
SCVAL(p,1,lp_minor_announce_version()); /* system version - e.g .1 in 4.1 */
|
||||
SCVAL(p,0,SAMBA_MAJOR_NBT_ANNOUNCE_VERSION); /* system version - e.g 4 in 4.1 */
|
||||
SCVAL(p,1,SAMBA_MINOR_NBT_ANNOUNCE_VERSION); /* system version - e.g .1 in 4.1 */
|
||||
p += 2;
|
||||
|
||||
SIVAL(p,0,PTR_DIFF(p2,*rdata));
|
||||
|
Loading…
x
Reference in New Issue
Block a user