summaryrefslogtreecommitdiffstats
path: root/source/libsmb
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
commit1809ea22c31ee28e109f49701f91534177027165 (patch)
tree1d2ae72067f1482f84d6a35ea39a00ff5402d3ec /source/libsmb
parent687275cd532f8f8ad710acd222a0c76625da53c6 (diff)
downloadsamba-1809ea22c31ee28e109f49701f91534177027165.tar.gz
samba-1809ea22c31ee28e109f49701f91534177027165.tar.xz
samba-1809ea22c31ee28e109f49701f91534177027165.zip
dsgetdcname: add map_ds_flags_to_nt_version.
Guenther
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/dsgetdcname.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/libsmb/dsgetdcname.c b/source/libsmb/dsgetdcname.c
index 1006b975c74..c7eb8005bc3 100644
--- a/source/libsmb/dsgetdcname.c
+++ b/source/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++) {