From 7d81e7757059686ae2c57748edfe6b948347748c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 22 Aug 2002 19:57:53 +0000 Subject: Put back in BDC support in set_server_role(). Tidied up debugs. (This used to be commit 08d7d6ffa65568209e953a2834d263cf3537064e) --- source3/param/loadparm.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 966124039f..6fb8cd896a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3496,32 +3496,46 @@ static void set_server_role(void) case SEC_SHARE: if (lp_domain_logons()) DEBUG(0, ("Server's Role (logon server) conflicts with share-level security\n")); - DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; case SEC_SERVER: case SEC_DOMAIN: case SEC_ADS: if (lp_domain_logons()) { server_role = ROLE_DOMAIN_PDC; - DEBUG(10,("set_server_role:ROLE_DOMAIN_PDC\n")); break; } server_role = ROLE_DOMAIN_MEMBER; - DEBUG(10,("set_server_role: ROLE_DOMAIN_MEMBER\n")); break; case SEC_USER: if (lp_domain_logons()) { - server_role = ROLE_DOMAIN_PDC; - DEBUG(10,("set_server_role: ROLE_DOMAIN_PDC\n")); - break; + + if (lp_domain_master()) + server_role = ROLE_DOMAIN_PDC; + else + server_role = ROLE_DOMAIN_BDC; } - DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; default: DEBUG(0, ("Server's Role undefined due to unknown security mode\n")); - DEBUG(10,("set_server_role: ROLE_STANDALONE\n")); break; } + + DEBUG(10, ("set_server_role: role = ")); + + switch(server_role) { + case ROLE_STANDALONE: + DEBUGADD(10, ("ROLE_STANDALONE\n")); + break; + case ROLE_DOMAIN_MEMBER: + DEBUGADD(10, ("ROLE_DOMAIN_MEMBER\n")); + break; + case ROLE_DOMAIN_BDC: + DEBUGADD(10, ("ROLE_DOMAIN_BDC\n")); + break; + case ROLE_DOMAIN_PDC: + DEBUGADD(10, ("ROLE_DOMAIN_PDC\n")); + break; + } } -- cgit