|
|
|
@ -76,7 +76,7 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
|
|
|
|
|
n1 = search.out.netlogon;
|
|
|
|
|
n1 = *search.out.netlogon;
|
|
|
|
|
|
|
|
|
|
search.in.user = "Administrator";
|
|
|
|
|
search.in.realm = n1.data.nt5_ex.dns_domain;
|
|
|
|
@ -106,20 +106,25 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.user = NULL;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
torture_assert(tctx,
|
|
|
|
|
strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") == NULL,
|
|
|
|
|
strstr(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
"\\\\") == NULL,
|
|
|
|
|
"PDC name should not be in UNC form");
|
|
|
|
|
|
|
|
|
|
printf("Trying with User=Administrator\n");
|
|
|
|
|
search.in.user = "Administrator";
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name,
|
|
|
|
|
search.in.user);
|
|
|
|
|
torture_assert(tctx,
|
|
|
|
|
strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") == NULL,
|
|
|
|
|
strstr(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
"\\\\") == NULL,
|
|
|
|
|
"PDC name should not be in UNC form");
|
|
|
|
|
|
|
|
|
|
search.in.version = NETLOGON_NT_VERSION_5;
|
|
|
|
@ -130,20 +135,25 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.user = NULL;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
torture_assert(tctx,
|
|
|
|
|
strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") != NULL,
|
|
|
|
|
strstr(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
"\\\\") != NULL,
|
|
|
|
|
"PDC name should be in UNC form");
|
|
|
|
|
|
|
|
|
|
printf("Trying with User=Administrator\n");
|
|
|
|
|
search.in.user = "Administrator";
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_USER_UNKNOWN);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name,
|
|
|
|
|
search.in.user);
|
|
|
|
|
torture_assert(tctx,
|
|
|
|
|
strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") != NULL,
|
|
|
|
|
strstr(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
"\\\\") != NULL,
|
|
|
|
|
"PDC name should be in UNC form");
|
|
|
|
|
|
|
|
|
|
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
|
|
|
|
@ -153,10 +163,14 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.domain_guid = GUID_string(tctx, &n1.data.nt5_ex.domain_uuid);
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(GUID_string(tctx, &search.out.netlogon.data.nt5_ex.domain_uuid), search.in.domain_guid);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(GUID_string(tctx,
|
|
|
|
|
&search.out.netlogon->data.nt5_ex.domain_uuid),
|
|
|
|
|
search.in.domain_guid);
|
|
|
|
|
torture_assert(tctx,
|
|
|
|
|
strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") == NULL,
|
|
|
|
|
strstr(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
"\\\\") == NULL,
|
|
|
|
|
"PDC name should not be in UNC form");
|
|
|
|
|
|
|
|
|
|
printf("Trying with a incorrect GUID\n");
|
|
|
|
@ -171,16 +185,18 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.realm = n1.data.nt5_ex.dns_domain;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
|
|
|
|
|
printf("Trying with a zero AAC\n");
|
|
|
|
|
search.in.acct_control = 0x0;
|
|
|
|
|
search.in.realm = n1.data.nt5_ex.dns_domain;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
|
|
|
|
|
printf("Trying with a zero AAC and user=Administrator\n");
|
|
|
|
|
search.in.acct_control = 0x0;
|
|
|
|
@ -188,8 +204,10 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.realm = n1.data.nt5_ex.dns_domain;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "Administrator");
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name,
|
|
|
|
|
"Administrator");
|
|
|
|
|
|
|
|
|
|
printf("Trying with a bad AAC\n");
|
|
|
|
|
search.in.user = NULL;
|
|
|
|
@ -197,34 +215,50 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.realm = n1.data.nt5_ex.dns_domain;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
|
|
|
|
|
printf("Trying with a user only\n");
|
|
|
|
|
search = empty_search;
|
|
|
|
|
search.in.user = "Administrator";
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.domain_name, n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.pdc_name, n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.server_site, n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.client_site, n1.data.nt5_ex.client_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.forest,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.dns_domain,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.domain_name,
|
|
|
|
|
n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name,
|
|
|
|
|
search.in.user);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.server_site,
|
|
|
|
|
n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.client_site,
|
|
|
|
|
n1.data.nt5_ex.client_site);
|
|
|
|
|
|
|
|
|
|
printf("Trying with just a bad username\n");
|
|
|
|
|
search.in.user = "___no_such_user___";
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.domain_name, n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.pdc_name, n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.server_site, n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.client_site, n1.data.nt5_ex.client_site);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_USER_UNKNOWN_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.forest,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.dns_domain,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.domain_name,
|
|
|
|
|
n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name,
|
|
|
|
|
search.in.user);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.server_site,
|
|
|
|
|
n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.client_site,
|
|
|
|
|
n1.data.nt5_ex.client_site);
|
|
|
|
|
|
|
|
|
|
printf("Trying with just a bad domain\n");
|
|
|
|
|
search = empty_search;
|
|
|
|
@ -236,53 +270,81 @@ static bool test_ldap_netlogon(struct torture_context *tctx,
|
|
|
|
|
search.in.domain_guid = GUID_string(tctx, &n1.data.nt5_ex.domain_uuid);
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.domain_name, n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.pdc_name, n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.server_site, n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.client_site, n1.data.nt5_ex.client_site);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.forest,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.dns_domain,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.domain_name,
|
|
|
|
|
n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.server_site,
|
|
|
|
|
n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.client_site,
|
|
|
|
|
n1.data.nt5_ex.client_site);
|
|
|
|
|
|
|
|
|
|
printf("Trying with a incorrect domain and incorrect guid\n");
|
|
|
|
|
search.in.domain_guid = GUID_string(tctx, &guid);
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_NOT_FOUND);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.domain_name, n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.pdc_name, n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.server_site, n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.client_site, n1.data.nt5_ex.client_site);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.forest,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.dns_domain,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.domain_name,
|
|
|
|
|
n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.server_site,
|
|
|
|
|
n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.client_site,
|
|
|
|
|
n1.data.nt5_ex.client_site);
|
|
|
|
|
|
|
|
|
|
printf("Trying with a incorrect GUID and correct domain\n");
|
|
|
|
|
search.in.domain_guid = GUID_string(tctx, &guid);
|
|
|
|
|
search.in.realm = n1.data.nt5_ex.dns_domain;
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.domain_name, n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.pdc_name, n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.server_site, n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.client_site, n1.data.nt5_ex.client_site);
|
|
|
|
|
CHECK_VAL(search.out.netlogon->data.nt5_ex.command,
|
|
|
|
|
LOGON_SAM_LOGON_RESPONSE_EX);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.forest,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.dns_domain,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.domain_name,
|
|
|
|
|
n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name, "");
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.server_site,
|
|
|
|
|
n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.client_site,
|
|
|
|
|
n1.data.nt5_ex.client_site);
|
|
|
|
|
|
|
|
|
|
printf("Proof other results\n");
|
|
|
|
|
search.in.user = "Administrator";
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.domain_name, n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.pdc_name, n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.server_site, n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon.data.nt5_ex.client_site, n1.data.nt5_ex.client_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.forest,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.dns_domain,
|
|
|
|
|
n1.data.nt5_ex.dns_domain);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.domain_name,
|
|
|
|
|
n1.data.nt5_ex.domain_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.pdc_name,
|
|
|
|
|
n1.data.nt5_ex.pdc_name);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.user_name,
|
|
|
|
|
search.in.user);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.server_site,
|
|
|
|
|
n1.data.nt5_ex.server_site);
|
|
|
|
|
CHECK_STRING(search.out.netlogon->data.nt5_ex.client_site,
|
|
|
|
|
n1.data.nt5_ex.client_site);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -311,7 +373,7 @@ static bool test_ldap_netlogon_flags(struct torture_context *tctx,
|
|
|
|
|
status = request_netlogon(cldap, tctx, &search);
|
|
|
|
|
CHECK_STATUS(status, NT_STATUS_OK);
|
|
|
|
|
|
|
|
|
|
n1 = search.out.netlogon;
|
|
|
|
|
n1 = *search.out.netlogon;
|
|
|
|
|
if (n1.ntver == NETLOGON_NT_VERSION_5)
|
|
|
|
|
server_type = n1.data.nt5.server_type;
|
|
|
|
|
else if (n1.ntver == NETLOGON_NT_VERSION_5EX)
|
|
|
|
@ -457,13 +519,20 @@ static NTSTATUS tcp_ldap_netlogon(void *conn,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
blob = res->attributes[0].values;
|
|
|
|
|
status = pull_netlogon_samlogon_response(blob, mem_ctx,
|
|
|
|
|
&io->out.netlogon);
|
|
|
|
|
|
|
|
|
|
io->out.netlogon = talloc(mem_ctx, struct netlogon_samlogon_response);
|
|
|
|
|
if (io->out.netlogon == NULL) {
|
|
|
|
|
return NT_STATUS_NO_MEMORY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
status = pull_netlogon_samlogon_response(blob,
|
|
|
|
|
io->out.netlogon,
|
|
|
|
|
io->out.netlogon);
|
|
|
|
|
if (!NT_STATUS_IS_OK(status)) {
|
|
|
|
|
return status;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map_netlogon_samlogon_response(&io->out.netlogon);
|
|
|
|
|
map_netlogon_samlogon_response(io->out.netlogon);
|
|
|
|
|
|
|
|
|
|
return NT_STATUS_OK;
|
|
|
|
|
}
|
|
|
|
@ -624,7 +693,7 @@ static NTSTATUS udp_ldap_netlogon(void *data,
|
|
|
|
|
struct cldap_socket);
|
|
|
|
|
NTSTATUS status = cldap_netlogon(cldap, mem_ctx, io);
|
|
|
|
|
if (NT_STATUS_IS_OK(status)) {
|
|
|
|
|
map_netlogon_samlogon_response(&io->out.netlogon);
|
|
|
|
|
map_netlogon_samlogon_response(io->out.netlogon);
|
|
|
|
|
}
|
|
|
|
|
return status;
|
|
|
|
|
}
|
|
|
|
|