summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-01-02 16:24:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:11 -0500
commitaa731aceb86a979f46874118e1595f2a3da12638 (patch)
tree95d24a36dabd530942e7c7ac17e489ef7edd0d25 /source4/rpc_server
parentfa010c96766fb97e5c4f02f485a5ea774ac07d63 (diff)
downloadsamba-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)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dssetup/dcesrv_dssetup.c14
1 files changed, 9 insertions, 5 deletions
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;
}