mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s3:rpcclient: remove unused code from cmd_lsa_get_username()
lsa_GetUserName() doesn't require a policy handle. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
committed by
Günther Deschner
parent
dd42daa98d
commit
7d201c096e
@ -1469,7 +1469,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx, int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct policy_handle pol;
|
||||
NTSTATUS status, result;
|
||||
const char *servername = cli->desthost;
|
||||
struct lsa_String *account_name = NULL;
|
||||
@ -1481,14 +1480,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
status = rpccli_lsa_open_policy(cli, mem_ctx, true,
|
||||
SEC_FLAG_MAXIMUM_ALLOWED,
|
||||
&pol);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = dcerpc_lsa_GetUserName(b, mem_ctx,
|
||||
servername,
|
||||
&account_name,
|
||||
@ -1508,7 +1499,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
|
||||
account_name->string, authority_name ? authority_name->string :
|
||||
"");
|
||||
|
||||
dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
|
||||
done:
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user