From 376ba1921f031e002f615f443873b96f92fb85f5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 20 Nov 2003 01:02:09 +0000 Subject: some errors are expected in SAMR and LSA tests - don't fail the test when they are given (This used to be commit 6e2d3aa433cc77f2ac9f2a7c807bc2668a8b7a9a) --- source4/torture/rpc/lsa.c | 12 ++++++++++++ source4/torture/rpc/samr.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 3b7b65f779..35b4ff3333 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -421,6 +421,12 @@ static BOOL test_EnumTrustDom(struct dcerpc_pipe *p, r.out.resume_handle = &resume_handle; status = dcerpc_lsa_EnumTrustDom(p, mem_ctx, &r); + + /* NO_MORE_ENTRIES is allowed */ + if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) { + return True; + } + if (!NT_STATUS_IS_OK(status)) { printf("EnumTrustDom failed - %s\n", nt_errstr(status)); return False; @@ -447,6 +453,12 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p, printf("\ntrying QueryInfoPolicy level %d\n", i); status = dcerpc_lsa_QueryInfoPolicy(p, mem_ctx, &r); + + if ((i == 9 || i == 10) && + NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) { + continue; + } + if (!NT_STATUS_IS_OK(status)) { printf("QueryInfoPolicy failed - %s\n", nt_errstr(status)); ret = False; diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 6c7418a5fb..b8102e3c49 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -91,6 +91,12 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing CreateUser(%s)\n", r.in.username->name); status = dcerpc_samr_CreateUser(p, mem_ctx, &r); + + if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) { + printf("Server refused create of '%s'\n", r.in.username->name); + return True; + } + if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) { printf("CreateUser failed - %s\n", nt_errstr(status)); -- cgit