summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-01-04 11:46:47 +0100
committerStefan Metzmacher <metze@samba.org>2012-01-04 20:06:14 +0100
commit6ee628341fe25c258c49b43a111ff96b05dcd07b (patch)
tree3571f22fc1dacbf158c41610704601f510c8f5d5 /source4/torture
parent55db69198b76daaaba4a1e3d5c7195e4056ebb2c (diff)
downloadsamba-6ee628341fe25c258c49b43a111ff96b05dcd07b.tar.gz
samba-6ee628341fe25c258c49b43a111ff96b05dcd07b.tar.bz2
samba-6ee628341fe25c258c49b43a111ff96b05dcd07b.zip
LDAP-CLDAP: demonstrate that pdc name is not an unc path
For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX, pdc name is not in unc path form. [MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form, while NetbiosComputerName is not in unc form. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jan 4 20:06:14 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/ldap/cldap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index b3f62762cf..fc8c337ff3 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -105,6 +105,9 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
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, "");
+ torture_assert(tctx,
+ 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";
@@ -112,6 +115,9 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
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);
+ torture_assert(tctx,
+ 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;
status = cldap_netlogon(cldap, tctx, &search);
@@ -146,6 +152,9 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
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);
+ torture_assert(tctx,
+ 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");
guid = GUID_random();