diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-26 07:33:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:19 -0500 |
commit | efc29ecc21a57e83ac43b875f612e4f6fd20117d (patch) | |
tree | 531f6c71b537cec37b6c65a0580161d7b9482784 /source4/torture | |
parent | d66c2b477d9cfb3cf68127214c92b4b3bcb8aa22 (diff) | |
download | samba-efc29ecc21a57e83ac43b875f612e4f6fd20117d.tar.gz samba-efc29ecc21a57e83ac43b875f612e4f6fd20117d.tar.bz2 samba-efc29ecc21a57e83ac43b875f612e4f6fd20117d.zip |
r902: added torture tests for sending rubbish in the domain name field of GetDomPwInfo
(This used to be commit 00096609978e829b5da36040c15afa087e71eaa5)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/samr.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 49faaa886c..9d90a8b136 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -600,9 +600,17 @@ 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)) { + printf("GetDomPwInfo failed - %s\n", nt_errstr(status)); + 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)) { @@ -610,6 +618,25 @@ static BOOL test_GetDomPwInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 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; } |