s3-lsa: Fix Bug #6263. Unexpected LookupSids reply crashes XP pre-SP3.
authorGünther Deschner <gd@samba.org>
Wed, 15 Apr 2009 23:42:35 +0000 (01:42 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 15 Apr 2009 23:45:24 +0000 (01:45 +0200)
LookupSids needs to bounce back string sids in case of NT_STATUS_NONE_MAPPED.

Guenther

source/rpc_server/srv_lsa_nt.c

index f9cfeedd230d6109015bdea1e54711f919b57b9a..96ee36afde4dc49192ac6d2717dee0f1a114fb38 100644 (file)
@@ -828,7 +828,15 @@ NTSTATUS _lsa_LookupSids(pipes_struct *p,
                                           &names,
                                           &mapped_count);
 
-       if (NT_STATUS_IS_ERR(status)) {
+       /* Only return here when there is a real error.
+          NT_STATUS_NONE_MAPPED is a special case as it indicates that none of
+          the requested sids could be resolved. Older versions of XP (pre SP3)
+          rely that we return with the string representations of those SIDs in
+          that case. If we don't, XP crashes - Guenther
+          */
+
+       if (NT_STATUS_IS_ERR(status) &&
+           !NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
                return status;
        }