From a7a638c3cf6ee4a8f56d18a4d2e35fa5097c9183 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 16 Mar 2011 18:59:28 +0100 Subject: s3: Fix Coverity ID 2213, PASS_BY_VALUE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's little point to pass a copy of this structure on the stack. Günther, please check! --- source3/rpc_server/lsa/srv_lsa_nt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index 0f0bbe159b..061b481071 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -1598,7 +1598,7 @@ NTSTATUS _lsa_OpenTrustedDomainByName(struct pipes_struct *p, static NTSTATUS add_trusted_domain_user(TALLOC_CTX *mem_ctx, const char *netbios_name, const char *domain_name, - struct trustDomainPasswords auth_struct) + const struct trustDomainPasswords *auth_struct) { NTSTATUS status; struct samu *sam_acct; @@ -1638,14 +1638,14 @@ static NTSTATUS add_trusted_domain_user(TALLOC_CTX *mem_ctx, return NT_STATUS_UNSUCCESSFUL; } - for (i = 0; i < auth_struct.incoming.count; i++) { - switch (auth_struct.incoming.current.array[i].AuthType) { + for (i = 0; i < auth_struct->incoming.count; i++) { + switch (auth_struct->incoming.current.array[i].AuthType) { case TRUST_AUTH_TYPE_CLEAR: if (!convert_string_talloc(mem_ctx, CH_UTF16LE, CH_UNIX, - auth_struct.incoming.current.array[i].AuthInfo.clear.password, - auth_struct.incoming.current.array[i].AuthInfo.clear.size, + auth_struct->incoming.current.array[i].AuthInfo.clear.password, + auth_struct->incoming.current.array[i].AuthInfo.clear.size, &dummy, &dummy_size, false)) { @@ -1785,7 +1785,7 @@ NTSTATUS _lsa_CreateTrustedDomainEx2(struct pipes_struct *p, status = add_trusted_domain_user(p->mem_ctx, r->in.info->netbios_name.string, r->in.info->domain_name.string, - auth_struct); + &auth_struct); if (!NT_STATUS_IS_OK(status)) { return status; } -- cgit