mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
mailslot/cldap: use nt_version bits in queries.
Guenther (This used to be commit b261f063125f8454d8f4e8f6b6f8aa5bc393ea34)
This commit is contained in:
parent
5c02872a10
commit
1f6065765c
@ -217,6 +217,7 @@ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
|
|||||||
{
|
{
|
||||||
int sock;
|
int sock;
|
||||||
int ret;
|
int ret;
|
||||||
|
uint32_t nt_version = NETLOGON_VERSION_5 | NETLOGON_VERSION_5EX;
|
||||||
|
|
||||||
sock = open_udp_socket(server, LDAP_PORT );
|
sock = open_udp_socket(server, LDAP_PORT );
|
||||||
if (sock == -1) {
|
if (sock == -1) {
|
||||||
@ -225,7 +226,7 @@ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = send_cldap_netlogon(sock, realm, global_myname(), 6);
|
ret = send_cldap_netlogon(sock, realm, global_myname(), nt_version);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
close(sock);
|
close(sock);
|
||||||
return False;
|
return False;
|
||||||
|
@ -784,6 +784,9 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
|
|||||||
fstring tmp_dc_name;
|
fstring tmp_dc_name;
|
||||||
struct messaging_context *msg_ctx = msg_context(mem_ctx);
|
struct messaging_context *msg_ctx = msg_context(mem_ctx);
|
||||||
struct nbt_ntlogon_packet *reply = NULL;
|
struct nbt_ntlogon_packet *reply = NULL;
|
||||||
|
uint32_t nt_version = NETLOGON_VERSION_1 |
|
||||||
|
NETLOGON_VERSION_5 |
|
||||||
|
NETLOGON_VERSION_5EX_WITH_IP;
|
||||||
|
|
||||||
if (flags & DS_PDC_REQUIRED) {
|
if (flags & DS_PDC_REQUIRED) {
|
||||||
name_type = NBT_NAME_PDC;
|
name_type = NBT_NAME_PDC;
|
||||||
@ -802,7 +805,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
if (send_getdc_request(mem_ctx, msg_ctx,
|
if (send_getdc_request(mem_ctx, msg_ctx,
|
||||||
&dclist[i].ss, domain_name,
|
&dclist[i].ss, domain_name,
|
||||||
NULL, 11))
|
NULL, nt_version))
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
smb_msleep(100);
|
smb_msleep(100);
|
||||||
|
@ -1030,6 +1030,7 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx,
|
|||||||
fstring name )
|
fstring name )
|
||||||
{
|
{
|
||||||
struct ip_service ip_list;
|
struct ip_service ip_list;
|
||||||
|
uint32_t nt_version = NETLOGON_VERSION_1;
|
||||||
|
|
||||||
ip_list.ss = *pss;
|
ip_list.ss = *pss;
|
||||||
ip_list.port = 0;
|
ip_list.port = 0;
|
||||||
@ -1093,7 +1094,8 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx,
|
|||||||
/* try GETDC requests next */
|
/* try GETDC requests next */
|
||||||
|
|
||||||
if (send_getdc_request(mem_ctx, winbind_messaging_context(),
|
if (send_getdc_request(mem_ctx, winbind_messaging_context(),
|
||||||
pss, domain->name, &domain->sid, 1)) {
|
pss, domain->name, &domain->sid,
|
||||||
|
nt_version)) {
|
||||||
const char *dc_name = NULL;
|
const char *dc_name = NULL;
|
||||||
int i;
|
int i;
|
||||||
smb_msleep(100);
|
smb_msleep(100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user