]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix bug 6097
authorVolker Lendecke <vl@samba.org>
Tue, 24 Mar 2009 10:07:16 +0000 (11:07 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 24 Mar 2009 10:58:33 +0000 (11:58 +0100)
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!

source/passdb/lookup_sid.c
source/rpc_server/srv_lsa_nt.c

index 2a5eacd4601fc42c72ab71a5a8732bb715ba548d..f4fc7b55e0e237d759a175bf0fff9e66f89b2d83 100644 (file)
@@ -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;
                        }
                }
index 0176d16fbc2e413e1a68effee3fe73fbe6df5b02..f9cfeedd230d6109015bdea1e54711f919b57b9a 100644 (file)
@@ -828,6 +828,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);