diff options
author | Volker Lendecke <vl@samba.org> | 2009-03-24 11:07:16 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-03-27 13:06:55 +0100 |
commit | 95ff7e45dbdd2a9853d7504e479055e1951053df (patch) | |
tree | e74fa115bfaca504c99ed2b96614d081b538d90a | |
parent | 4325963c86f148682f49876bd2eb71e97afc01f8 (diff) | |
download | samba-95ff7e45dbdd2a9853d7504e479055e1951053df.tar.gz samba-95ff7e45dbdd2a9853d7504e479055e1951053df.tar.xz samba-95ff7e45dbdd2a9853d7504e479055e1951053df.zip |
Fix bug 6097
A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.
Thanks to Pavel <wylda@volny.cz> for the bug report!
(cherry picked from commit bb76066e8797599e5ca75821a686e32dd0c97a74)
-rw-r--r-- | source/passdb/lookup_sid.c | 2 | ||||
-rw-r--r-- | source/rpc_server/srv_lsa_nt.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source/passdb/lookup_sid.c b/source/passdb/lookup_sid.c index a7175b9647f..d767fa4f50a 100644 --- a/source/passdb/lookup_sid.c +++ b/source/passdb/lookup_sid.c @@ -804,7 +804,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids, } else { /* This is a normal SID with rid component */ if (!sid_split_rid(&sid, &rid)) { - result = NT_STATUS_INVALID_PARAMETER; + result = NT_STATUS_INVALID_SID; goto fail; } } diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index 9ce992ce25d..9d411eccb9d 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -830,6 +830,10 @@ NTSTATUS _lsa_LookupSids(pipes_struct *p, &names, &mapped_count); + if (NT_STATUS_IS_ERR(status)) { + return status; + } + /* Convert from lsa_TranslatedName2 to lsa_TranslatedName */ names_out = TALLOC_ARRAY(p->mem_ctx, struct lsa_TranslatedName, num_sids); |