mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r902: added torture tests for sending rubbish in the domain name field of GetDomPwInfo
(This used to be commit 0009660997
)
This commit is contained in:
parent
d66c2b477d
commit
efc29ecc21
@ -600,9 +600,8 @@ static BOOL test_GetDomPwInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
struct samr_GetDomPwInfo r;
|
||||
BOOL ret = True;
|
||||
|
||||
printf("Testing GetDomPwInfo\n");
|
||||
|
||||
r.in.name = domain_name;
|
||||
printf("Testing GetDomPwInfo with name %s\n", r.in.name->name);
|
||||
|
||||
status = dcerpc_samr_GetDomPwInfo(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -610,6 +609,34 @@ static BOOL test_GetDomPwInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
ret = False;
|
||||
}
|
||||
|
||||
r.in.name->name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
|
||||
printf("Testing GetDomPwInfo with name %s\n", r.in.name->name);
|
||||
|
||||
status = dcerpc_samr_GetDomPwInfo(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("GetDomPwInfo failed - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
|
||||
r.in.name->name = "\\\\__NONAME__";
|
||||
printf("Testing GetDomPwInfo with name %s\n", r.in.name->name);
|
||||
|
||||
status = dcerpc_samr_GetDomPwInfo(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("GetDomPwInfo failed - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
|
||||
r.in.name->name = "\\\\Builtin";
|
||||
printf("Testing GetDomPwInfo with name %s\n", r.in.name->name);
|
||||
|
||||
status = dcerpc_samr_GetDomPwInfo(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("GetDomPwInfo failed - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user