summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-05-07 14:38:35 +0200
committerGünther Deschner <gd@samba.org>2008-05-09 14:59:18 +0200
commitfcdee399884ae73eaf10663fb718f148bb4aff24 (patch)
treef714d57a5c1ad3c8716d811024ad75b231b0fe9a /source3
parent73b65bcd1416cf0f692f861fdb2b92e951f0ea7c (diff)
downloadsamba-fcdee399884ae73eaf10663fb718f148bb4aff24.tar.gz
samba-fcdee399884ae73eaf10663fb718f148bb4aff24.tar.bz2
samba-fcdee399884ae73eaf10663fb718f148bb4aff24.zip
dsgetdcname: add map_ds_flags_to_nt_version.
Guenther (This used to be commit 1809ea22c31ee28e109f49701f91534177027165)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/dsgetdcname.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 1006b975c7..c7eb8005bc 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -633,6 +633,32 @@ static NTSTATUS make_domain_controller_info(TALLOC_CTX *mem_ctx,
/****************************************************************
****************************************************************/
+static uint32_t map_ds_flags_to_nt_version(uint32_t flags)
+{
+ uint32_t nt_version = 0;
+
+ if (flags & DS_PDC_REQUIRED) {
+ nt_version |= NETLOGON_VERSION_PDC;
+ }
+
+ if (flags & DS_GC_SERVER_REQUIRED) {
+ nt_version |= NETLOGON_VERSION_GC;
+ }
+
+ if (flags & DS_TRY_NEXTCLOSEST_SITE) {
+ nt_version |= NETLOGON_VERSION_WITH_CLOSEST_SITE;
+ }
+
+ if (flags & DS_IP_REQUIRED) {
+ nt_version |= NETLOGON_VERSION_IP;
+ }
+
+ return nt_version;
+}
+
+/****************************************************************
+****************************************************************/
+
static NTSTATUS process_dc_dns(TALLOC_CTX *mem_ctx,
const char *domain_name,
uint32_t flags,
@@ -783,6 +809,8 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
name_type = NBT_NAME_PDC;
}
+ nt_version |= map_ds_flags_to_nt_version(flags);
+
DEBUG(10,("process_dc_netbios\n"));
for (i=0; i<num_dcs; i++) {