diff options
-rw-r--r-- | source4/provision.ldif | 1 | ||||
-rw-r--r-- | source4/rpc_server/dssetup/dcesrv_dssetup.c | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source4/provision.ldif b/source4/provision.ldif index 6271a6fa2b..8ebf6a9c40 100644 --- a/source4/provision.ldif +++ b/source4/provision.ldif @@ -66,6 +66,7 @@ pwdProperties: 1 pwdHistoryLength: 24 objectSid: ${DOMAINSID} serverState: 1 +nTMixedDomain: 1 uASCompat: 1 modifiedCount: 1 objectCategory: CN=Domain-DNS,CN=Schema,CN=Configuration,${BASEDN} diff --git a/source4/rpc_server/dssetup/dcesrv_dssetup.c b/source4/rpc_server/dssetup/dcesrv_dssetup.c index 9277298f66..f57f461ca5 100644 --- a/source4/rpc_server/dssetup/dcesrv_dssetup.c +++ b/source4/rpc_server/dssetup/dcesrv_dssetup.c @@ -39,7 +39,7 @@ static WERROR dssetup_DsRoleGetPrimaryDomainInformation(struct dcesrv_call_state case DS_ROLE_BASIC_INFORMATION: { void *sam_ctx; - const char * const attrs[] = { "dnsDomain", "objectGUID", "name", NULL }; + const char * const attrs[] = { "dnsDomain", "nTMixedDomain", "objectGUID", "name", NULL }; int ret; struct ldb_message **res; union dssetup_DsRoleInfo *info; @@ -95,13 +95,17 @@ static WERROR dssetup_DsRoleGetPrimaryDomainInformation(struct dcesrv_call_state return WERR_SERVER_UNAVAILABLE; } - flags = 0; - flags |= DS_ROLE_PRIMARY_DS_RUNNING; - flags |= DS_ROLE_PRIMARY_DS_MIXED_MODE; - flags |= DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT; + flags = DS_ROLE_PRIMARY_DS_RUNNING; + + if (samdb_result_uint(res[0], "nTMixedDomain", 0) == 1) { + flags |= DS_ROLE_PRIMARY_DS_MIXED_MODE; + } + domain = samdb_result_string(res[0], "name", NULL); dns_domain = samdb_result_string(res[0], "dnsDomain", NULL); forest = samdb_result_string(res[0], "dnsDomain", NULL); + + flags |= DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT; domain_guid = samdb_result_guid(res[0], "objectGUID"); break; } |