From: Andrew Bartlett Date: Mon, 7 Jan 2008 10:46:13 +0000 (-0600) Subject: r26683: Add another testcase. I still don't know what's wrong here. X-Git-Tag: samba-4.0.0alpha6~801^3~760 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=8174ed1ebec29c597645b61943be533a4ccfba24;hp=4e064c5ce6d1de4d366bd8b63fa89aed10c68514 r26683: Add another testcase. I still don't know what's wrong here. Andrew Bartlett (This used to be commit 341929c615e5573887889cf22950a25b536c6fc1) --- diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c index bea4b08c8ba..4e58059770f 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);