diff options
author | Günther Deschner <gd@samba.org> | 2008-11-25 12:19:35 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-11-25 15:39:51 +0100 |
commit | 948218643a04e8bf28de5c716cb9e4115d8b2aa0 (patch) | |
tree | a1881ef376e6df7270370f24666feb5c86f7c880 | |
parent | 03304c5152c8d56030a6e79e37f106a786ed0f64 (diff) | |
download | samba-948218643a04e8bf28de5c716cb9e4115d8b2aa0.tar.gz samba-948218643a04e8bf28de5c716cb9e4115d8b2aa0.tar.bz2 samba-948218643a04e8bf28de5c716cb9e4115d8b2aa0.zip |
s3-samr: fix _samr_LookupNames return code.
Guenther
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 3cc86edd62..ba9d911c2b 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1794,6 +1794,7 @@ NTSTATUS _samr_LookupNames(pipes_struct *p, DOM_SID pol_sid; uint32 acc_granted; struct samr_Ids rids, types; + uint32_t num_mapped = 0; DEBUG(5,("_samr_LookupNames: %d\n", __LINE__)); @@ -1841,10 +1842,18 @@ NTSTATUS _samr_LookupNames(pipes_struct *p, } if (type[i] != SID_NAME_UNKNOWN) { - status = NT_STATUS_OK; + num_mapped++; } } + if (num_mapped == num_rids) { + status = NT_STATUS_OK; + } else if (num_mapped == 0) { + status = NT_STATUS_NONE_MAPPED; + } else { + status = STATUS_SOME_UNMAPPED; + } + rids.count = num_rids; rids.ids = rid; |