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:52:56 +0000 (01:52 +0200)
LookupSids needs to bounce back string sids in case of NT_STATUS_NONE_MAPPED.

Guenther
(cherry picked from commit 1c9266c8caa59e287b993393b6050732a0b33547)

source3/rpc_server/srv_lsa_nt.c

index 0ce2b40f656be019f1a5735482115f29ae6a0119..9481c206f66b4583cbf61ce2ec7dfa4841d666cc 100644 (file)
@@ -827,7 +827,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;
        }