mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
some errors are expected in SAMR and LSA tests - don't fail the test
when they are given
(This used to be commit 6e2d3aa433
)
This commit is contained in:
parent
66a827c921
commit
376ba1921f
@ -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;
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user