Issue-4875: Explicitly request RW permissions or the Group Policy and Enterprise physical stores will fail with ACCESS_DENIED
Jason Stephenson committed
Mar 25, 2020 at 15:12 UTC
6ef267bc108ea6dcfc958da281b51baf30a93078
1 file changed
+1
-1
src/ca/scacertexec.cpp
+1
-1
@@ -175,7 +175,7 @@ static HRESULT ExecuteCertificateOperation(
175
}
176
177
// Open the right store.
178
- hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, NULL, dwStoreLocation, pwzStore);
178
+ hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, NULL, dwStoreLocation | CERT_STORE_MAXIMUM_ALLOWED_FLAG, pwzStore);
179
MessageExitOnNullWithLastError(hCertStore, hr, msierrCERTFailedOpen, "Failed to open certificate store: %ls", pwzStore);
180
181
if (SCA_ACTION_INSTALL == saAction) // install operations need more data