diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-06-06 12:51:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:53:12 -0500 |
commit | c74ad3546c57bef9b324a324585431081c5cbf30 (patch) | |
tree | 6b6bcf57b535e979ac852a137ee0e4d5bcfa96e4 /source4/torture/rpc/samr.c | |
parent | d89e6c774bbf6738183459c52acbd3220482d58a (diff) | |
download | samba-c74ad3546c57bef9b324a324585431081c5cbf30.tar.gz samba-c74ad3546c57bef9b324a324585431081c5cbf30.tar.bz2 samba-c74ad3546c57bef9b324a324585431081c5cbf30.zip |
r23365: Try to make Windows Vista join again. On my new test environment, it
wants to check for an existing domain join account, and fails. This
test shows that we need to return NT_STATUS_NONE_MAPPED when nothing
matches. (not yet tested if this helps vista).
Andrew Bartlett
(This used to be commit 7f3671bf11cab36a5c795d7db86f85081b73bc71)
Diffstat (limited to 'source4/torture/rpc/samr.c')
-rw-r--r-- | source4/torture/rpc/samr.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index c82ecb0abc..819a8acd4b 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -922,17 +922,43 @@ static NTSTATUS test_LookupName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, status = dcerpc_samr_LookupNames(p, mem_ctx, &n); if (!NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) { printf("LookupNames[2] failed - %s\n", nt_errstr(status)); + if (NT_STATUS_IS_OK(status)) { + return NT_STATUS_UNSUCCESSFUL; + } return status; } - init_lsa_String(&sname[1], "xxNONAMExx"); n.in.num_names = 0; status = dcerpc_samr_LookupNames(p, mem_ctx, &n); if (!NT_STATUS_IS_OK(status)) { printf("LookupNames[0] failed - %s\n", nt_errstr(status)); + return status; } - return status; + init_lsa_String(&sname[0], "xxNONAMExx"); + n.in.num_names = 1; + status = dcerpc_samr_LookupNames(p, mem_ctx, &n); + if (!NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) { + printf("LookupNames[1 bad name] failed - %s\n", nt_errstr(status)); + if (NT_STATUS_IS_OK(status)) { + return NT_STATUS_UNSUCCESSFUL; + } + return status; + } + + init_lsa_String(&sname[0], "xxNONAMExx"); + init_lsa_String(&sname[1], "xxNONAME2xx"); + n.in.num_names = 2; + status = dcerpc_samr_LookupNames(p, mem_ctx, &n); + if (!NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) { + printf("LookupNames[2 bad names] failed - %s\n", nt_errstr(status)); + if (NT_STATUS_IS_OK(status)) { + return NT_STATUS_UNSUCCESSFUL; + } + return status; + } + + return NT_STATUS_OK; } static NTSTATUS test_OpenUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, |