diff options
author | Günther Deschner <gd@samba.org> | 2008-10-21 01:20:53 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-27 19:33:22 +0100 |
commit | 6a2dabe1a7faae47dce359b77d886a9489b66fcb (patch) | |
tree | 5da6140b3215b205d78fa0e47b7ce38ae1ab4449 /source4/rpc_server | |
parent | 6131c0d8888c8bc1923794b9b93c1cb44bb071e3 (diff) | |
download | samba-6a2dabe1a7faae47dce359b77d886a9489b66fcb.tar.gz samba-6a2dabe1a7faae47dce359b77d886a9489b66fcb.tar.bz2 samba-6a2dabe1a7faae47dce359b77d886a9489b66fcb.zip |
s4-lsa: merge lsa_GetUserName from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 26 |
1 files changed, 15 insertions, 11 deletions
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; } |