From 6a2dabe1a7faae47dce359b77d886a9489b66fcb Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 21 Oct 2008 01:20:53 +0200 Subject: s4-lsa: merge lsa_GetUserName from s3 lsa idl. Guenther --- source4/rpc_server/lsa/dcesrv_lsa.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index b009d2f2f8..52d054886c 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -2875,19 +2875,23 @@ static NTSTATUS dcesrv_lsa_GetUserName(struct dcesrv_call_state *dce_call, TALLO const char *account_name; const char *authority_name; struct lsa_String *_account_name; - struct lsa_StringPointer *_authority_name = NULL; + struct lsa_String *_authority_name = NULL; /* this is what w2k3 does */ r->out.account_name = r->in.account_name; r->out.authority_name = r->in.authority_name; - if (r->in.account_name && r->in.account_name->string) { + if (r->in.account_name + && *r->in.account_name + /* && *(*r->in.account_name)->string */ + ) { return NT_STATUS_INVALID_PARAMETER; } - if (r->in.authority_name && - r->in.authority_name->string && - r->in.authority_name->string->string) { + if (r->in.authority_name + && *r->in.authority_name + /* && *(*r->in.authority_name)->string */ + ) { return NT_STATUS_INVALID_PARAMETER; } @@ -2899,15 +2903,15 @@ static NTSTATUS dcesrv_lsa_GetUserName(struct dcesrv_call_state *dce_call, TALLO _account_name->string = account_name; if (r->in.authority_name) { - _authority_name = talloc(mem_ctx, struct lsa_StringPointer); + _authority_name = talloc(mem_ctx, struct lsa_String); NT_STATUS_HAVE_NO_MEMORY(_authority_name); - _authority_name->string = talloc(mem_ctx, struct lsa_String); - NT_STATUS_HAVE_NO_MEMORY(_authority_name->string); - _authority_name->string->string = authority_name; + _authority_name->string = authority_name; } - r->out.account_name = _account_name; - r->out.authority_name = _authority_name; + *r->out.account_name = _account_name; + if (r->out.authority_name) { + *r->out.authority_name = _authority_name; + } return status; } -- cgit