mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
dsgetdcname: add map_ds_flags_to_nt_version.
Guenther (This used to be commit 1809ea22c31ee28e109f49701f91534177027165)
This commit is contained in:
parent
73b65bcd14
commit
fcdee39988
@ -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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user