summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-02-02 19:53:10 +0000
committerLuke Leighton <lkcl@samba.org>1999-02-02 19:53:10 +0000
commit07948f3f2d6625d1197036bb1763269f2e52345f (patch)
treebee9abc1a599cf9438d3a1a2b0233ceb3977d8c6 /source3/param
parent8fdc846070011a84e6e68ee2f89bbc1852602535 (diff)
downloadsamba-07948f3f2d6625d1197036bb1763269f2e52345f.tar.gz
samba-07948f3f2d6625d1197036bb1763269f2e52345f.tar.bz2
samba-07948f3f2d6625d1197036bb1763269f2e52345f.zip
server type announcements modified to include the "role" of the server:
domain member, pdc, bdc. (This used to be commit d95bb252f838b3612f5eba5d2b61d7b38b01f5ef)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c67
1 files changed, 58 insertions, 9 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index ff8ccff99b..8f92af90a9 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -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;
+ }
}