summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));