diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 12:22:05 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 12:22:05 +0200 |
commit | d17b9c4509f8430d01dea924e625ef9d2fdaad90 (patch) | |
tree | dd6c822348c1c337be22fdf648fb8ca5686f8908 /source4/torture/ldap/cldap.c | |
parent | 904359cd2fcacf41d3e886921f40c7cb227b255d (diff) | |
parent | 59105620dc6aff5bfd23a25841778f28825b4386 (diff) | |
download | samba-d17b9c4509f8430d01dea924e625ef9d2fdaad90.tar.gz samba-d17b9c4509f8430d01dea924e625ef9d2fdaad90.tar.bz2 samba-d17b9c4509f8430d01dea924e625ef9d2fdaad90.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into nosmbpython
(This used to be commit 5c56464a6c2f29a039ba3152de83d34778ca0615)
Diffstat (limited to 'source4/torture/ldap/cldap.c')
-rw-r--r-- | source4/torture/ldap/cldap.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c index a77920d4e6..5d4acd581b 100644 --- a/source4/torture/ldap/cldap.c +++ b/source4/torture/ldap/cldap.c @@ -144,18 +144,38 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest) CHECK_STATUS(status, NT_STATUS_NOT_FOUND); printf("Trying with a AAC\n"); - search.in.acct_control = 0x180; + search.in.acct_control = ACB_WSTRUST|ACB_SVRTRUST; search.in.realm = n1.nt5_ex.dns_domain; status = cldap_netlogon(cldap, tctx, &search); CHECK_STATUS(status, NT_STATUS_OK); CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX); CHECK_STRING(search.out.netlogon.nt5_ex.user_name, ""); + printf("Trying with a zero AAC\n"); + search.in.acct_control = 0x0; + search.in.realm = n1.nt5_ex.dns_domain; + status = cldap_netlogon(cldap, tctx, &search); + CHECK_STATUS(status, NT_STATUS_OK); + CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX); + CHECK_STRING(search.out.netlogon.nt5_ex.user_name, ""); + + printf("Trying with a zero AAC and user=Administrator\n"); + search.in.acct_control = 0x0; + search.in.user = "Administrator"; + search.in.realm = n1.nt5_ex.dns_domain; + status = cldap_netlogon(cldap, tctx, &search); + CHECK_STATUS(status, NT_STATUS_OK); + CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX); + CHECK_STRING(search.out.netlogon.nt5_ex.user_name, "Administrator"); + printf("Trying with a bad AAC\n"); + search.in.user = NULL; search.in.acct_control = 0xFF00FF00; search.in.realm = n1.nt5_ex.dns_domain; status = cldap_netlogon(cldap, tctx, &search); CHECK_STATUS(status, NT_STATUS_OK); + CHECK_VAL(search.out.netlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX); + CHECK_STRING(search.out.netlogon.nt5_ex.user_name, ""); printf("Trying with a user only\n"); search = empty_search; |