https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9159190039eb941a7dfd3…
commit 9159190039eb941a7dfd3bc5917d4c9776029a3a
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Fri Oct 5 11:40:55 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Fri Oct 5 12:04:21 2018 +0200
[SERVICES] Ignore the case when we compare account names
---
base/system/services/database.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/base/system/services/database.c b/base/system/services/database.c
index c4c372c320..ea91a5cb45 100644
--- a/base/system/services/database.c
+++ b/base/system/services/database.c
@@ -151,16 +151,23 @@ ScmIsSameServiceAccount(
_In_ PCWSTR pszAccountName1,
_In_ PCWSTR pszAccountName2)
{
- if (pszAccountName1 == NULL && pszAccountName2 == NULL)
+ if (pszAccountName1 == NULL &&
+ pszAccountName2 == NULL)
return TRUE;
- if (pszAccountName1 == NULL && pszAccountName2 &&
wcscmp(pszAccountName2, L"LocalSystem") == 0)
+ if (pszAccountName1 == NULL &&
+ pszAccountName2 != NULL &&
+ _wcsicmp(pszAccountName2, L"LocalSystem") == 0)
return TRUE;
- if (pszAccountName2 == NULL && pszAccountName1 &&
wcscmp(pszAccountName1, L"LocalSystem") == 0)
+ if (pszAccountName1 != NULL &&
+ pszAccountName2 == NULL &&
+ _wcsicmp(pszAccountName1, L"LocalSystem") == 0)
return TRUE;
- if (pszAccountName1 && pszAccountName2 && wcscmp(pszAccountName1,
pszAccountName2) == 0)
+ if (pszAccountName1 != NULL &&
+ pszAccountName2 != NULL &&
+ _wcsicmp(pszAccountName1, pszAccountName2) == 0)
return TRUE;
return FALSE;
@@ -173,7 +180,7 @@ ScmIsLocalSystemAccount(
_In_ PCWSTR pszAccountName)
{
if (pszAccountName == NULL ||
- wcscmp(pszAccountName, L"LocalSystem") == 0)
+ _wcsicmp(pszAccountName, L"LocalSystem") == 0)
return TRUE;
return FALSE;