summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-20 01:02:09 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-20 01:02:09 +0000
commit376ba1921f031e002f615f443873b96f92fb85f5 (patch)
treef49d29205bd2e55bbd1d8ef661f6370dade97407
parent66a827c921565ed8cb201228c335fca1d0d7b5e9 (diff)
downloadsamba-376ba1921f031e002f615f443873b96f92fb85f5.tar.gz
samba-376ba1921f031e002f615f443873b96f92fb85f5.tar.bz2
samba-376ba1921f031e002f615f443873b96f92fb85f5.zip
some errors are expected in SAMR and LSA tests - don't fail the test
when they are given (This used to be commit 6e2d3aa433cc77f2ac9f2a7c807bc2668a8b7a9a)
-rw-r--r--source4/torture/rpc/lsa.c12
-rw-r--r--source4/torture/rpc/samr.c6
2 files changed, 18 insertions, 0 deletions
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));