From 4d626c294c4783d454e27ea4e5614037dac8576e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 1 Nov 2025 20:24:25 -0700 Subject: 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 --- src/ext/Iis/ca/scaapppool.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/ext/Iis/ca/scaapppool.cpp') diff --git a/src/ext/Iis/ca/scaapppool.cpp b/src/ext/Iis/ca/scaapppool.cpp index 781c55ca..951f2d4b 100644 --- a/src/ext/Iis/ca/scaapppool.cpp +++ b/src/ext/Iis/ca/scaapppool.cpp @@ -80,7 +80,7 @@ HRESULT ScaAppPoolRead( WcaLog(LOGMSG_VERBOSE, "Skipping ScaAppPoolRead() - required table not present"); ExitFunction1(hr = S_FALSE); } - + hr = WcaBeginUnwrapQuery(&hComponentQuery, ppwzCustomActionData); ExitOnFailure(hr, "Failed to unwrap query for ScaAppPoolRead"); @@ -478,17 +478,17 @@ HRESULT ScaWriteAppPool( } else if (psap->iAttributes & APATTR_OTHERUSER) { - if (!*psap->suUser.wzDomain || CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzDomain, -1, L".", -1)) + if (!*psap->suUser.wzDomain || CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzDomain, -1, L".", -1, TRUE)) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"NetworkService", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"NetworkService", -1, TRUE)) { dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"LocalService", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"LocalService", -1, TRUE)) { dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"LocalSystem", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"LocalSystem", -1, TRUE)) { dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; } @@ -497,17 +497,17 @@ HRESULT ScaWriteAppPool( dwIdentity = MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER; } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzDomain, -1, L"NT AUTHORITY", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzDomain, -1, L"NT AUTHORITY", -1, TRUE)) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"NETWORK SERVICE", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"NETWORK SERVICE", -1, TRUE)) { dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"SERVICE", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"SERVICE", -1, TRUE)) { dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"SYSTEM", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"SYSTEM", -1, TRUE)) { dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; } -- cgit v1.2.3-55-g6feb