From 8174ed1ebec29c597645b61943be533a4ccfba24 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 7 Jan 2008 04:46:13 -0600 Subject: r26683: Add another testcase. I still don't know what's wrong here. Andrew Bartlett (This used to be commit 341929c615e5573887889cf22950a25b536c6fc1) --- source4/torture/ldap/cldap.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source4/torture/ldap') 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); -- cgit