From bcfa4a326b721a30a870a4aca25f6b99a8b3f17f Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 6 Jun 2016 12:15:28 -0700 Subject: [PATCH] dll: POSIX interop: minor fix --- src/dll/posix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dll/posix.c b/src/dll/posix.c index 8735cfb0..1da8822b 100644 --- a/src/dll/posix.c +++ b/src/dll/posix.c @@ -163,7 +163,8 @@ FSP_API NTSTATUS FspPosixMapUidToSid(UINT32 Uid, PSID *PSid) { InitOnceExecuteOnce(&FspPosixInitOnceV, FspPosixInitOnceF, 0, 0); - if (5 == FspAccountDomainSid->IdentifierAuthority.Value[5] && + if (0 != FspAccountDomainSid && + 5 == FspAccountDomainSid->IdentifierAuthority.Value[5] && 4 == FspAccountDomainSid->SubAuthorityCount) { *PSid = FspPosixCreateSid(5, 5, @@ -178,7 +179,8 @@ FSP_API NTSTATUS FspPosixMapUidToSid(UINT32 Uid, PSID *PSid) { InitOnceExecuteOnce(&FspPosixInitOnceV, FspPosixInitOnceF, 0, 0); - if (5 == FspPrimaryDomainSid->IdentifierAuthority.Value[5] && + if (0 != FspPrimaryDomainSid && + 5 == FspPrimaryDomainSid->IdentifierAuthority.Value[5] && 4 == FspPrimaryDomainSid->SubAuthorityCount) { *PSid = FspPosixCreateSid(5, 5,