diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-12-21 09:41:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:33 -0500 |
commit | c2f94222e9625593e026d21ff314039cc776c592 (patch) | |
tree | 62c152453fe157cbdedfc1de3a2f1e6c5143d9b0 /source4 | |
parent | e67b4392646ec623bd613d6e73b7494ddd0d251f (diff) | |
download | samba-c2f94222e9625593e026d21ff314039cc776c592.tar.gz samba-c2f94222e9625593e026d21ff314039cc776c592.tar.bz2 samba-c2f94222e9625593e026d21ff314039cc776c592.zip |
r4309: idl and torture test for lsa_GetUserName()
why does samba3 return domain_name as in the unknown_name field in the code
and on the wire it returns DCERPC_FAULT_OP_RNG_ERROR?
all of my test machines NT4,W2K,W2K3,XP returned NULL
and if I file the string in the .in.* the server echos the strings back
and returns NT_STATUS_INVALID_PARAMETER
metze
(This used to be commit 67e765b7e984d7aac2a7786b5bd0c80d10d6de5d)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/idl/lsa.idl | 12 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 29 |
2 files changed, 38 insertions, 3 deletions
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index 5928f44d32..ec694df1bf 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -649,9 +649,17 @@ [out,ref] policy_handle *handle ); + /**********************/ + /* Function: 0x2d */ + typedef struct { + lsa_String *string; + } lsa_StringPointer; - /* Function: 0x2d */ - NTSTATUS lsa_GetUserName(); + NTSTATUS lsa_GetUserName( + [in] unistr *system_name, + [in,out] lsa_String *account_name, + [in,out] lsa_StringPointer *unknown_name + ); /**********************/ /* Function: 0x2e */ diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index fd67269977..39d433a791 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -1138,6 +1138,29 @@ static BOOL test_QueryInfoPolicy2(struct dcerpc_pipe *p, return ret; } +static BOOL test_GetUserName(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + struct lsa_GetUserName r; + NTSTATUS status; + BOOL ret = True; + printf("\nTesting GetUserName\n"); + + r.in.system_name = "\\"; + r.in.account_name = NULL; + r.in.unknown_name = NULL; + + status = dcerpc_lsa_GetUserName(p, mem_ctx, &r); + + if (!NT_STATUS_IS_OK(status)) { + printf("GetUserName failed - %s\n", nt_errstr(status)); + ret = False; + } + + return ret; +} + static BOOL test_Close(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle) @@ -1230,7 +1253,11 @@ BOOL torture_rpc_lsa(void) if (!test_QueryInfoPolicy2(p, mem_ctx, &handle)) { ret = False; } - + + if (!test_GetUserName(p, mem_ctx, &handle)) { + ret = False; + } + #if 0 if (!test_Delete(p, mem_ctx, &handle)) { ret = False; |