mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
server type announcements modified to include the "role" of the server:
domain member, pdc, bdc.
This commit is contained in:
parent
1cb8fcb33b
commit
d95bb252f8
@ -2620,15 +2620,64 @@ char *volume_label(int snum)
|
||||
********************************************************************/
|
||||
static void set_default_server_announce_type(void)
|
||||
{
|
||||
default_server_announce = (SV_TYPE_WORKSTATION | SV_TYPE_SERVER |
|
||||
SV_TYPE_SERVER_UNIX | SV_TYPE_PRINTQ_SERVER);
|
||||
if(lp_announce_as() == ANNOUNCE_AS_NT)
|
||||
default_server_announce |= (SV_TYPE_SERVER_NT | SV_TYPE_NT);
|
||||
else if(lp_announce_as() == ANNOUNCE_AS_WIN95)
|
||||
default_server_announce |= SV_TYPE_WIN95_PLUS;
|
||||
else if(lp_announce_as() == ANNOUNCE_AS_WFW)
|
||||
default_server_announce |= SV_TYPE_WFW;
|
||||
default_server_announce |= (lp_time_server() ? SV_TYPE_TIME_SOURCE : 0);
|
||||
default_server_announce = 0;
|
||||
default_server_announce |= SV_TYPE_WORKSTATION;
|
||||
default_server_announce |= SV_TYPE_SERVER;
|
||||
default_server_announce |= SV_TYPE_SERVER_UNIX;
|
||||
default_server_announce |= SV_TYPE_PRINTQ_SERVER;
|
||||
|
||||
switch (lp_announce_as())
|
||||
{
|
||||
case ANNOUNCE_AS_NT:
|
||||
{
|
||||
default_server_announce |= SV_TYPE_SERVER_NT;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
switch (lp_server_role())
|
||||
{
|
||||
case ROLE_DOMAIN_MEMBER:
|
||||
{
|
||||
default_server_announce |= SV_TYPE_DOMAIN_MEMBER;
|
||||
break;
|
||||
}
|
||||
case ROLE_DOMAIN_PDC:
|
||||
{
|
||||
default_server_announce |= SV_TYPE_DOMAIN_CTRL;
|
||||
break;
|
||||
}
|
||||
case ROLE_DOMAIN_BDC:
|
||||
{
|
||||
default_server_announce |= SV_TYPE_DOMAIN_BAKCTRL;
|
||||
break;
|
||||
}
|
||||
case ROLE_DOMAIN_NONE:
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (lp_time_server())
|
||||
{
|
||||
default_server_announce |= SV_TYPE_TIME_SOURCE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -865,9 +865,12 @@ static void srv_reply_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *q_n,
|
||||
case 102:
|
||||
{
|
||||
make_srv_info_102(&ctr.srv.sv102,
|
||||
500, global_myname, lp_serverstring(),
|
||||
5, 4, /* major/minor version - NT 5.4 :-) */
|
||||
0x4100b, /* browsing stuff SV_TYPE_XXXX */
|
||||
500, /* platform id */
|
||||
global_myname,
|
||||
lp_serverstring(),
|
||||
lp_major_announce_version(),
|
||||
lp_minor_announce_version(),
|
||||
lp_default_server_announce(),
|
||||
0xffffffff, /* users */
|
||||
0xf, /* disc */
|
||||
0, /* hidden */
|
||||
@ -880,9 +883,11 @@ static void srv_reply_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *q_n,
|
||||
case 101:
|
||||
{
|
||||
make_srv_info_101(&ctr.srv.sv101,
|
||||
500, global_myname,
|
||||
5, 4, /* major/minor version - NT 5.4 :-) */
|
||||
0x4100b, /* browsing stuff SV_TYPE_XXXX */
|
||||
500, /* platform id */
|
||||
global_myname,
|
||||
lp_major_announce_version(),
|
||||
lp_minor_announce_version(),
|
||||
lp_default_server_announce(),
|
||||
lp_serverstring());
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user