diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-01-02 16:24:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:11 -0500 |
commit | aa731aceb86a979f46874118e1595f2a3da12638 (patch) | |
tree | 95d24a36dabd530942e7c7ac17e489ef7edd0d25 | |
parent | fa010c96766fb97e5c4f02f485a5ea774ac07d63 (diff) | |
download | samba-aa731aceb86a979f46874118e1595f2a3da12638.tar.gz samba-aa731aceb86a979f46874118e1595f2a3da12638.tar.bz2 samba-aa731aceb86a979f46874118e1595f2a3da12638.zip |
r4484: - use the nTMixedDomain attribute to check if our domain is mixed mode or not
metze
(This used to be commit 7fe9550375a7a922f9fc93944acaf7915ee107c1)
-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; } |