summaryrefslogtreecommitdiff
path: root/source4/torture/ldap
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-01-07 04:46:13 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-06 22:51:02 -0600
commit8174ed1ebec29c597645b61943be533a4ccfba24 (patch)
tree8af1179f3e4936a68635ab01ef511210a29c7cd2 /source4/torture/ldap
parent4e064c5ce6d1de4d366bd8b63fa89aed10c68514 (diff)
downloadsamba-8174ed1ebec29c597645b61943be533a4ccfba24.tar.gz
samba-8174ed1ebec29c597645b61943be533a4ccfba24.tar.bz2
samba-8174ed1ebec29c597645b61943be533a4ccfba24.zip
r26683: Add another testcase. I still don't know what's wrong here.
Andrew Bartlett (This used to be commit 341929c615e5573887889cf22950a25b536c6fc1)
Diffstat (limited to 'source4/torture/ldap')
-rw-r--r--source4/torture/ldap/cldap.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index bea4b08c8b..4e58059770 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -80,6 +80,27 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
}
+ search.in.version = 0x20000006;
+ status = cldap_netlogon(cldap, tctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ printf("Trying with User=NULL\n");
+
+ search.in.user = NULL;
+ status = cldap_netlogon(cldap, tctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ CHECK_STRING(search.out.netlogon.logon5.user_name, "");
+ CHECK_VAL(search.out.netlogon.logon5.type, NETLOGON_RESPONSE_FROM_PDC2);
+
+ printf("Trying with User=Administrator\n");
+
+ search.in.user = "Administrator";
+ status = cldap_netlogon(cldap, tctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ CHECK_STRING(search.out.netlogon.logon5.user_name, search.in.user);
+ CHECK_VAL(search.out.netlogon.logon5.type, NETLOGON_RESPONSE_FROM_PDC_USER);
+
search.in.version = 6;
status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);