summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-21 18:06:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:46 -0500
commit331d4fc58c9a7dee70f85d3fe03738bd9b43dc36 (patch)
treef6381256a04a5b8ecbfbf3fa75a4560b195dd099 /source3
parent74a81e6ba61ddc9a473b4c7c15fd7aae553b9b8b (diff)
downloadsamba-331d4fc58c9a7dee70f85d3fe03738bd9b43dc36.tar.gz
samba-331d4fc58c9a7dee70f85d3fe03738bd9b43dc36.tar.bz2
samba-331d4fc58c9a7dee70f85d3fe03738bd9b43dc36.zip
r810: Fix from "Jerome Borsboom" <j.borsboom@erasmusmc.nl> to ensure error status
codes don't get overwritten. Jeremy. (This used to be commit c179451b07c2315a667c2ff683cd30c4d224758e)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 1d7fdb0e54..b4e29e6748 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -669,12 +669,12 @@ done:
/* set up the LSA Lookup SIDs response */
init_lsa_trans_names(p->mem_ctx, ref, names, num_entries, sid, &mapped_count);
- if (mapped_count == 0)
- r_u->status = NT_STATUS_NONE_MAPPED;
- else if (mapped_count != num_entries)
- r_u->status = STATUS_SOME_UNMAPPED;
- else
- r_u->status = NT_STATUS_OK;
+ if (NT_STATUS_IS_OK(r_u->status)) {
+ if (mapped_count == 0)
+ r_u->status = NT_STATUS_NONE_MAPPED;
+ else if (mapped_count != num_entries)
+ r_u->status = STATUS_SOME_UNMAPPED;
+ }
init_reply_lookup_sids(r_u, ref, names, mapped_count);
return r_u->status;