summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-19 23:00:01 +0000
committerJeremy Allison <jra@samba.org>2004-02-19 23:00:01 +0000
commit1bfc09c51ce4f89f7855f38bd724b26cfbc8f8c7 (patch)
tree46d8b9321498883d034ae5fefdf206021367ee8e /source3/rpc_server
parent95bc32e93ccda3adb4dc54fb20ed3216222006f9 (diff)
downloadsamba-1bfc09c51ce4f89f7855f38bd724b26cfbc8f8c7.tar.gz
samba-1bfc09c51ce4f89f7855f38bd724b26cfbc8f8c7.tar.bz2
samba-1bfc09c51ce4f89f7855f38bd724b26cfbc8f8c7.zip
Fixup correct (as per W2K3) returns for lookupsids as well as lookupnames.
Inspired by Volkers patch. Jeremy. (This used to be commit a47127e90e7d0928b772ba45bd843eeeacc9ef8a)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 66adc8398a..07c024e1ca 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -174,7 +174,7 @@ static void init_lsa_rid2s(DOM_R_REF *ref, DOM_RID2 *rid2,
(*mapped_count)++;
} else {
dom_idx = -1;
- rid = 0xffffffff;
+ rid = 0;
name_type = SID_NAME_UNKNOWN;
}
@@ -202,11 +202,6 @@ static void init_reply_lookup_names(LSA_R_LOOKUP_NAMES *r_l,
r_l->dom_rid = rid2;
r_l->mapped_count = mapped_count;
-
- if (mapped_count == 0)
- r_l->status = NT_STATUS_NONE_MAPPED;
- else
- r_l->status = NT_STATUS_OK;
}
/***************************************************************************
@@ -711,6 +706,12 @@ done:
/* set up the LSA Lookup RIDs response */
init_lsa_rid2s(ref, rids, num_entries, names, &mapped_count, p->endian);
+ 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;
init_reply_lookup_names(r_u, ref, num_entries, rids, mapped_count);
return r_u->status;