56 lines
2.4 KiB
Diff
56 lines
2.4 KiB
Diff
From bff845848fa339fc9bae70eef8943c4956b9a6db Mon Sep 17 00:00:00 2001
|
|
From: Rakesh Soma <rakeshsoma@google.com>
|
|
Date: Fri, 26 Jun 2020 23:55:46 +0000
|
|
Subject: [PATCH 08/12] Handle lsa_account_rights size properly.
|
|
|
|
Bug: 1099890
|
|
Change-Id: Ib27d52be51b0067ef76c212aaa5e067ec20af6de
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2269882
|
|
Commit-Queue: Rakesh Soma <rakeshsoma@google.com>
|
|
Commit-Queue: Yusuf Sengul <yusufsn@google.com>
|
|
Reviewed-by: Yusuf Sengul <yusufsn@google.com>
|
|
Cr-Commit-Position: refs/heads/master@{#783200}
|
|
(cherry picked from commit 0070fe8bfa5126cebc78e1c22081f83b7f9c421c)
|
|
|
|
NOTRY=true
|
|
|
|
Change-Id: Ib27d52be51b0067ef76c212aaa5e067ec20af6de
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2270630
|
|
Commit-Queue: Rakesh Soma <rakeshsoma@google.com>
|
|
Reviewed-by: Rakesh Soma <rakeshsoma@google.com>
|
|
Reviewed-by: Yusuf Sengul <yusufsn@google.com>
|
|
Cr-Commit-Position: refs/branch-heads/4103@{#731}
|
|
Cr-Branched-From: 8ad47e8d21f6866e4a37f47d83a860d41debf514-refs/heads/master@{#756066}
|
|
---
|
|
chrome/credential_provider/gaiacp/scoped_lsa_policy.cc | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc b/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc
|
|
index 425f305716d..5c05d08e81f 100644
|
|
--- a/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc
|
|
+++ b/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc
|
|
@@ -133,7 +133,8 @@ HRESULT ScopedLsaPolicy::AddAccountRights(
|
|
InitLsaString(right.c_str(), &lsa_right);
|
|
lsa_rights.push_back(lsa_right);
|
|
}
|
|
- NTSTATUS sts = ::LsaAddAccountRights(handle_, sid, lsa_rights.data(), 1);
|
|
+ NTSTATUS sts =
|
|
+ ::LsaAddAccountRights(handle_, sid, lsa_rights.data(), lsa_rights.size());
|
|
if (sts != STATUS_SUCCESS) {
|
|
HRESULT hr = HRESULT_FROM_NT(sts);
|
|
LOGFN(ERROR) << "LsaAddAccountRights sts=" << putHR(sts)
|
|
@@ -152,8 +153,8 @@ HRESULT ScopedLsaPolicy::RemoveAccountRights(
|
|
InitLsaString(right.c_str(), &lsa_right);
|
|
lsa_rights.push_back(lsa_right);
|
|
}
|
|
- NTSTATUS sts =
|
|
- ::LsaRemoveAccountRights(handle_, sid, FALSE, lsa_rights.data(), 1);
|
|
+ NTSTATUS sts = ::LsaRemoveAccountRights(handle_, sid, FALSE,
|
|
+ lsa_rights.data(), lsa_rights.size());
|
|
if (sts != STATUS_SUCCESS) {
|
|
HRESULT hr = HRESULT_FROM_NT(sts);
|
|
LOGFN(ERROR) << "LsaRemoveAccountRights sts=" << putHR(sts)
|
|
--
|
|
2.28.0
|
|
|