diff options
-rw-r--r-- | source3/librpc/idl/lsa.idl | 2 | ||||
-rw-r--r-- | source4/librpc/idl/lsa.idl | 13 | ||||
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 14 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 13 |
4 files changed, 25 insertions, 17 deletions
diff --git a/source3/librpc/idl/lsa.idl b/source3/librpc/idl/lsa.idl index fff549fe01..1b2d9ea8fb 100644 --- a/source3/librpc/idl/lsa.idl +++ b/source3/librpc/idl/lsa.idl @@ -778,7 +778,7 @@ import "misc.idl", "security.idl"; /*******************/ /* Function: 0x21 */ - NTSTATUS lsa_LookupPrivDisplayName ( + NTSTATUS lsa_LookupPrivDisplayName( [in] policy_handle *handle, [in,ref] lsa_String *name, [in] uint16 language_id, diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index ae69e03cb2..c8cbab5bcc 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -773,14 +773,15 @@ import "misc.idl", "security.idl"; /*******************/ /* Function: 0x21 */ - NTSTATUS lsa_LookupPrivDisplayName ( - [in] policy_handle *handle, - [in] lsa_String *name, - [out,unique] lsa_StringLarge *disp_name, + NTSTATUS lsa_LookupPrivDisplayName( + [in] policy_handle *handle, + [in,ref] lsa_String *name, + [in] uint16 language_id, + [in] uint16 language_id_sys, + [out,ref] lsa_StringLarge **disp_name, /* see http://www.microsoft.com/globaldev/nlsweb/ for language definitions */ - [in,out] uint16 *language_id, - [in] uint16 unknown + [out,ref] uint16 *returned_language_id ); /*******************/ diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index 52d054886c..1285936f3c 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -2729,6 +2729,7 @@ static NTSTATUS dcesrv_lsa_LookupPrivDisplayName(struct dcesrv_call_state *dce_c { struct dcesrv_handle *h; struct lsa_policy_state *state; + struct lsa_StringLarge *disp_name = NULL; int id; DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_POLICY); @@ -2739,17 +2740,20 @@ static NTSTATUS dcesrv_lsa_LookupPrivDisplayName(struct dcesrv_call_state *dce_c if (id == -1) { return NT_STATUS_NO_SUCH_PRIVILEGE; } - - r->out.disp_name = talloc(mem_ctx, struct lsa_StringLarge); - if (r->out.disp_name == NULL) { + + disp_name = talloc(mem_ctx, struct lsa_StringLarge); + if (disp_name == NULL) { return NT_STATUS_NO_MEMORY; } - r->out.disp_name->string = sec_privilege_display_name(id, r->in.language_id); - if (r->out.disp_name->string == NULL) { + disp_name->string = sec_privilege_display_name(id, &r->in.language_id); + if (disp_name->string == NULL) { return NT_STATUS_INTERNAL_ERROR; } + *r->out.disp_name = disp_name; + *r->out.returned_language_id = 0; + return NT_STATUS_OK; } diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index d299176285..9cb209335b 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -1604,14 +1604,17 @@ static bool test_LookupPrivDisplayName(struct dcerpc_pipe *p, /* produce a reasonable range of language output without screwing up terminals */ uint16_t language_id = (random() % 4) + 0x409; + uint16_t returned_language_id = 0; + struct lsa_StringLarge *disp_name = NULL; printf("\nTesting LookupPrivDisplayName(%s)\n", priv_name->string); r.in.handle = handle; r.in.name = priv_name; - r.in.language_id = &language_id; - r.out.language_id = &language_id; - r.in.unknown = 0; + r.in.language_id = language_id; + r.in.language_id_sys = 0; + r.out.returned_language_id = &returned_language_id; + r.out.disp_name = &disp_name; status = dcerpc_lsa_LookupPrivDisplayName(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { @@ -1619,8 +1622,8 @@ static bool test_LookupPrivDisplayName(struct dcerpc_pipe *p, return false; } printf("%s -> \"%s\" (language 0x%x/0x%x)\n", - priv_name->string, r.out.disp_name->string, - *r.in.language_id, *r.out.language_id); + priv_name->string, disp_name->string, + r.in.language_id, *r.out.returned_language_id); return true; } |