summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-05-17 20:52:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-05-17 20:52:23 +1000
commit24264e9acb12938f666bcdfc92ee4f9ed6409112 (patch)
treee15c79297b69b5ed221883c96570a979d348b3e8 /source4/torture
parent4f557d7954eb80e566a91b2fe22f7b7e30e0b456 (diff)
downloadsamba-24264e9acb12938f666bcdfc92ee4f9ed6409112.tar.gz
samba-24264e9acb12938f666bcdfc92ee4f9ed6409112.tar.bz2
samba-24264e9acb12938f666bcdfc92ee4f9ed6409112.zip
Modify the LDAP-CLDAP test for better coverage.
This fixes up some compiled in constants and checks a couple more NT versions. Andrew Bartlett (This used to be commit ca1b3fe3add06dc22361d5a5fe7e63a6abb1697c)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/ldap/cldap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index bb77acd2d0..a77920d4e6 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -83,7 +83,8 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
}
- search.in.version = 0x20000006;
+ search.in.version = NETLOGON_NT_VERSION_5|NETLOGON_NT_VERSION_5EX|NETLOGON_NT_VERSION_IP;
+
status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -104,7 +105,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STRING(search.out.netlogon.nt5_ex.user_name, search.in.user);
CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
- search.in.version = 6;
+ search.in.version = NETLOGON_NT_VERSION_5;
status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -114,7 +115,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_STRING(search.out.netlogon.nt5_ex.user_name, "");
- CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
+ CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE);
printf("Trying with User=Administrator\n");
@@ -123,7 +124,9 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_STRING(search.out.netlogon.nt5_ex.user_name, search.in.user);
- CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
+ CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN);
+
+ search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
printf("Trying with a GUID\n");
search.in.realm = NULL;
@@ -168,6 +171,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_STRING(search.out.netlogon.nt5_ex.user_name, search.in.user);
CHECK_STRING(search.out.netlogon.nt5_ex.dns_domain, n1.nt5_ex.dns_domain);
+ CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
printf("Trying with just a bad domain\n");
search = empty_search;