summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-16 18:59:28 +0100
committerVolker Lendecke <vl@samba.org>2011-03-16 21:14:58 +0100
commita7a638c3cf6ee4a8f56d18a4d2e35fa5097c9183 (patch)
tree0557263197bc6ccf5ee8ef32306e4c9380fd1e45
parenta282455978eb28855317ec6b667436f9c0edda02 (diff)
downloadsamba-a7a638c3cf6ee4a8f56d18a4d2e35fa5097c9183.tar.gz
samba-a7a638c3cf6ee4a8f56d18a4d2e35fa5097c9183.tar.bz2
samba-a7a638c3cf6ee4a8f56d18a4d2e35fa5097c9183.zip
s3: Fix Coverity ID 2213, PASS_BY_VALUE
There's little point to pass a copy of this structure on the stack. Günther, please check!
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c12
1 files changed, 6 insertions, 6 deletions
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;
}