diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 20:24:25 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | 4d626c294c4783d454e27ea4e5614037dac8576e (patch) | |
| tree | 51d822f48716e4c5ef2a51ca28925896f221b521 /src/ext/Iis/ca/scaapppool.cpp | |
| parent | 33c12fa386aa7ace7a6bd06a45bc3ecf17e9c8f5 (diff) | |
| download | wix-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/ext/Iis/ca/scaapppool.cpp')
| -rw-r--r-- | src/ext/Iis/ca/scaapppool.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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( | |||
| 80 | WcaLog(LOGMSG_VERBOSE, "Skipping ScaAppPoolRead() - required table not present"); | 80 | WcaLog(LOGMSG_VERBOSE, "Skipping ScaAppPoolRead() - required table not present"); |
| 81 | ExitFunction1(hr = S_FALSE); | 81 | ExitFunction1(hr = S_FALSE); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | hr = WcaBeginUnwrapQuery(&hComponentQuery, ppwzCustomActionData); | 84 | hr = WcaBeginUnwrapQuery(&hComponentQuery, ppwzCustomActionData); |
| 85 | ExitOnFailure(hr, "Failed to unwrap query for ScaAppPoolRead"); | 85 | ExitOnFailure(hr, "Failed to unwrap query for ScaAppPoolRead"); |
| 86 | 86 | ||
| @@ -478,17 +478,17 @@ HRESULT ScaWriteAppPool( | |||
| 478 | } | 478 | } |
| 479 | else if (psap->iAttributes & APATTR_OTHERUSER) | 479 | else if (psap->iAttributes & APATTR_OTHERUSER) |
| 480 | { | 480 | { |
| 481 | if (!*psap->suUser.wzDomain || CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzDomain, -1, L".", -1)) | 481 | if (!*psap->suUser.wzDomain || CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzDomain, -1, L".", -1, TRUE)) |
| 482 | { | 482 | { |
| 483 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"NetworkService", -1)) | 483 | if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"NetworkService", -1, TRUE)) |
| 484 | { | 484 | { |
| 485 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; | 485 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; |
| 486 | } | 486 | } |
| 487 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"LocalService", -1)) | 487 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"LocalService", -1, TRUE)) |
| 488 | { | 488 | { |
| 489 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; | 489 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; |
| 490 | } | 490 | } |
| 491 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"LocalSystem", -1)) | 491 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"LocalSystem", -1, TRUE)) |
| 492 | { | 492 | { |
| 493 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; | 493 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; |
| 494 | } | 494 | } |
| @@ -497,17 +497,17 @@ HRESULT ScaWriteAppPool( | |||
| 497 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER; | 497 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER; |
| 498 | } | 498 | } |
| 499 | } | 499 | } |
| 500 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzDomain, -1, L"NT AUTHORITY", -1)) | 500 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzDomain, -1, L"NT AUTHORITY", -1, TRUE)) |
| 501 | { | 501 | { |
| 502 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"NETWORK SERVICE", -1)) | 502 | if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"NETWORK SERVICE", -1, TRUE)) |
| 503 | { | 503 | { |
| 504 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; | 504 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; |
| 505 | } | 505 | } |
| 506 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"SERVICE", -1)) | 506 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"SERVICE", -1, TRUE)) |
| 507 | { | 507 | { |
| 508 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; | 508 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; |
| 509 | } | 509 | } |
| 510 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"SYSTEM", -1)) | 510 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"SYSTEM", -1, TRUE)) |
| 511 | { | 511 | { |
| 512 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; | 512 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; |
| 513 | } | 513 | } |
