summaryrefslogtreecommitdiff
path: root/lib/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-10 22:08:20 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-15 09:18:33 +0200
commitb8815dc23d36468cce9b615335ed62f119eb8f35 (patch)
treef98b02f81e3fce8fbedadecf7f847e90bf40f4fa /lib/param
parentb9a75d8438470065633c1ff69c653eaa799d5718 (diff)
downloadsamba-b8815dc23d36468cce9b615335ed62f119eb8f35.tar.gz
samba-b8815dc23d36468cce9b615335ed62f119eb8f35.tar.bz2
samba-b8815dc23d36468cce9b615335ed62f119eb8f35.zip
lib/param: Create a seperate server role for "active directory domain controller"
This will allow us to detect from the smb.conf if this is a Samba4 AD DC which will allow smarter handling of (for example) accidentially starting smbd rather than samba. To cope with upgrades from existing Samba4 installs, 'domain controller' is a synonym of 'active directory domain controller' and new parameters 'classic primary domain controller' and 'classic backup domain controller' are added. Andrew Bartlett
Diffstat (limited to 'lib/param')
-rw-r--r--lib/param/loadparm_server_role.c4
-rw-r--r--lib/param/param_enums.c9
-rw-r--r--lib/param/util.c1
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/param/loadparm_server_role.c b/lib/param/loadparm_server_role.c
index 5a1f4984fe..46515dadbd 100644
--- a/lib/param/loadparm_server_role.c
+++ b/lib/param/loadparm_server_role.c
@@ -41,6 +41,7 @@ static const struct srv_role_tab {
{ ROLE_DOMAIN_MEMBER, "ROLE_DOMAIN_MEMBER" },
{ ROLE_DOMAIN_BDC, "ROLE_DOMAIN_BDC" },
{ ROLE_DOMAIN_PDC, "ROLE_DOMAIN_PDC" },
+ { ROLE_ACTIVE_DIRECTORY_DC, "ROLE_ACTIVE_DIRECTORY_DC" },
{ 0, NULL }
};
@@ -83,7 +84,7 @@ int lp_find_server_role(int server_role, int security, int domain_logons, int do
break;
case SEC_ADS:
if (domain_logons) {
- role = ROLE_DOMAIN_CONTROLLER;
+ role = ROLE_DOMAIN_BDC;
break;
}
role = ROLE_DOMAIN_MEMBER;
@@ -158,6 +159,7 @@ bool lp_is_security_and_server_role_valid(int server_role, int security)
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
+ case ROLE_ACTIVE_DIRECTORY_DC:
if (security == SEC_USER || security == SEC_ADS || security == SEC_DOMAIN) {
valid = true;
}
diff --git a/lib/param/param_enums.c b/lib/param/param_enums.c
index 5f4cd61bf6..08d60101d1 100644
--- a/lib/param/param_enums.c
+++ b/lib/param/param_enums.c
@@ -78,10 +78,11 @@ static const struct enum_list enum_server_role[] = {
{ROLE_STANDALONE, "standalone"},
{ROLE_DOMAIN_MEMBER, "member server"},
{ROLE_DOMAIN_MEMBER, "member"},
- /* note that currently
- ROLE_DOMAIN_CONTROLLER == ROLE_DOMAIN_BDC */
- {ROLE_DOMAIN_CONTROLLER, "domain controller"},
- {ROLE_DOMAIN_CONTROLLER, "dc"},
+ {ROLE_DOMAIN_PDC, "classic primary domain controller"},
+ {ROLE_DOMAIN_BDC, "classic backup domain controller"},
+ {ROLE_ACTIVE_DIRECTORY_DC, "active directory domain controller"},
+ {ROLE_ACTIVE_DIRECTORY_DC, "domain controller"},
+ {ROLE_ACTIVE_DIRECTORY_DC, "dc"},
{-1, NULL}
};
diff --git a/lib/param/util.c b/lib/param/util.c
index f60abb9773..98894fc747 100644
--- a/lib/param/util.c
+++ b/lib/param/util.c
@@ -260,6 +260,7 @@ const char *lpcfg_sam_name(struct loadparm_context *lp_ctx)
switch (lpcfg_server_role(lp_ctx)) {
case ROLE_DOMAIN_BDC:
case ROLE_DOMAIN_PDC:
+ case ROLE_ACTIVE_DIRECTORY_DC:
return lpcfg_workgroup(lp_ctx);
default:
return lpcfg_netbios_name(lp_ctx);