mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
Fix lsa_TrustedDomainInfo callers.
Guenther
This commit is contained in:
parent
83dc2e1477
commit
e0eae39017
@ -1001,7 +1001,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
|
|||||||
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||||
DOM_SID dom_sid;
|
DOM_SID dom_sid;
|
||||||
uint32 access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
|
uint32 access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
|
||||||
union lsa_TrustedDomainInfo info;
|
union lsa_TrustedDomainInfo *info = NULL;
|
||||||
enum lsa_TrustDomInfoEnum info_class = 1;
|
enum lsa_TrustDomInfoEnum info_class = 1;
|
||||||
|
|
||||||
if (argc > 3 || argc < 2) {
|
if (argc > 3 || argc < 2) {
|
||||||
@ -1028,7 +1028,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
|
|||||||
if (!NT_STATUS_IS_OK(result))
|
if (!NT_STATUS_IS_OK(result))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
|
display_trust_dom_info(mem_ctx, info, info_class, cli->pwd.password);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
rpccli_lsa_Close(cli, mem_ctx, &pol);
|
rpccli_lsa_Close(cli, mem_ctx, &pol);
|
||||||
@ -1085,7 +1085,7 @@ static NTSTATUS cmd_lsa_query_trustdominfo(struct rpc_pipe_client *cli,
|
|||||||
POLICY_HND pol, trustdom_pol;
|
POLICY_HND pol, trustdom_pol;
|
||||||
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||||
uint32 access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
|
uint32 access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
|
||||||
union lsa_TrustedDomainInfo info;
|
union lsa_TrustedDomainInfo *info = NULL;
|
||||||
DOM_SID dom_sid;
|
DOM_SID dom_sid;
|
||||||
enum lsa_TrustDomInfoEnum info_class = 1;
|
enum lsa_TrustDomInfoEnum info_class = 1;
|
||||||
|
|
||||||
@ -1123,7 +1123,7 @@ static NTSTATUS cmd_lsa_query_trustdominfo(struct rpc_pipe_client *cli,
|
|||||||
if (!NT_STATUS_IS_OK(result))
|
if (!NT_STATUS_IS_OK(result))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
display_trust_dom_info(mem_ctx, &info, info_class, cli->pwd.password);
|
display_trust_dom_info(mem_ctx, info, info_class, cli->pwd.password);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
rpccli_lsa_Close(cli, mem_ctx, &pol);
|
rpccli_lsa_Close(cli, mem_ctx, &pol);
|
||||||
|
@ -6128,7 +6128,7 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
|
|||||||
const char *trusted_dom_name)
|
const char *trusted_dom_name)
|
||||||
{
|
{
|
||||||
NTSTATUS nt_status;
|
NTSTATUS nt_status;
|
||||||
union lsa_TrustedDomainInfo info;
|
union lsa_TrustedDomainInfo *info = NULL;
|
||||||
char *cleartextpwd = NULL;
|
char *cleartextpwd = NULL;
|
||||||
DATA_BLOB data;
|
DATA_BLOB data;
|
||||||
|
|
||||||
@ -6143,12 +6143,8 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = data_blob(NULL, info.password.password->length);
|
data = data_blob(info->password.password->data,
|
||||||
|
info->password.password->length);
|
||||||
memcpy(data.data,
|
|
||||||
info.password.password->data,
|
|
||||||
info.password.password->length);
|
|
||||||
data.length = info.password.password->length;
|
|
||||||
|
|
||||||
cleartextpwd = decrypt_trustdom_secret(pipe_hnd->cli->pwd.password,
|
cleartextpwd = decrypt_trustdom_secret(pipe_hnd->cli->pwd.password,
|
||||||
&data);
|
&data);
|
||||||
|
Loading…
Reference in New Issue
Block a user