aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/acl2util.cpp
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2025-11-01 20:24:25 -0700
committerRob Mensching <rob@firegiant.com>2025-11-03 14:49:39 -0800
commit4d626c294c4783d454e27ea4e5614037dac8576e (patch)
tree51d822f48716e4c5ef2a51ca28925896f221b521 /src/libs/dutil/WixToolset.DUtil/acl2util.cpp
parent33c12fa386aa7ace7a6bd06a45bc3ecf17e9c8f5 (diff)
downloadwix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.gz
wix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.bz2
wix-4d626c294c4783d454e27ea4e5614037dac8576e.zip
Use CompareStringOrdinal() instead of CompareString() case-insensitive
This commit moves to the modern CompareStringOrdinal() for all case-insensitve uses of CompareString() with the invariant locale. Partially resolves 6947
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/acl2util.cpp')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/acl2util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/acl2util.cpp b/src/libs/dutil/WixToolset.DUtil/acl2util.cpp
index 598f12e7..e62a03d4 100644
--- a/src/libs/dutil/WixToolset.DUtil/acl2util.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/acl2util.cpp
@@ -106,7 +106,7 @@ extern "C" HRESULT DAPI AclGetAccountSidStringEx(
106 HRESULT hrLength = ::StringCchLengthW(wzAccount, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchAccount)); 106 HRESULT hrLength = ::StringCchLengthW(wzAccount, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchAccount));
107 AclExitOnFailure(hrLength, "Failed to get the length of the account name."); 107 AclExitOnFailure(hrLength, "Failed to get the length of the account name.");
108 108
109 if (11 < cchAccount && CSTR_EQUAL == CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, L"NT SERVICE\\", 11, wzAccount, 11)) 109 if (11 < cchAccount && CSTR_EQUAL == CompareStringOrdinal(L"NT SERVICE\\", 11, wzAccount, 11, TRUE))
110 { 110 {
111 // If the service is not installed then LookupAccountName doesn't resolve the SID, but we can calculate it. 111 // If the service is not installed then LookupAccountName doesn't resolve the SID, but we can calculate it.
112 LPCWSTR wzServiceName = &wzAccount[11]; 112 LPCWSTR wzServiceName = &wzAccount[11];