diff options
Diffstat (limited to 'src/ca/secureobj.cpp')
| -rw-r--r-- | src/ca/secureobj.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ca/secureobj.cpp b/src/ca/secureobj.cpp index f6d1406a..392945d9 100644 --- a/src/ca/secureobj.cpp +++ b/src/ca/secureobj.cpp | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | // structs | 5 | // structs |
| 6 | LPCWSTR wzQUERY_SECUREOBJECTS = L"SELECT `SecureObjects`.`SecureObject`, `SecureObjects`.`Table`, `SecureObjects`.`Domain`, `SecureObjects`.`User`, " | 6 | LPCWSTR wzQUERY_SECUREOBJECTS = L"SELECT `Wix4SecureObject`.`Wix4SecureObject`, `Wix4SecureObject`.`Table`, `Wix4SecureObject`.`Domain`, `Wix4SecureObject`.`User`, " |
| 7 | L"`SecureObjects`.`Permission`, `SecureObjects`.`Component_`, `Component`.`Attributes` FROM `SecureObjects`,`Component` WHERE " | 7 | L"`Wix4SecureObject`.`Permission`, `Wix4SecureObject`.`Component_`, `Component`.`Attributes` FROM `Wix4SecureObject`,`Component` WHERE " |
| 8 | L"`SecureObjects`.`Component_`=`Component`.`Component`"; | 8 | L"`Wix4SecureObject`.`Component_`=`Component`.`Component`"; |
| 9 | enum eQUERY_SECUREOBJECTS { QSO_SECUREOBJECT = 1, QSO_TABLE, QSO_DOMAIN, QSO_USER, QSO_PERMISSION, QSO_COMPONENT, QSO_COMPATTRIBUTES }; | 9 | enum eQUERY_SECUREOBJECTS { QSO_SECUREOBJECT = 1, QSO_TABLE, QSO_DOMAIN, QSO_USER, QSO_PERMISSION, QSO_COMPONENT, QSO_COMPATTRIBUTES }; |
| 10 | 10 | ||
| 11 | LPCWSTR wzQUERY_REGISTRY = L"SELECT `Registry`.`Registry`, `Registry`.`Root`, `Registry`.`Key` FROM `Registry` WHERE `Registry`.`Registry`=?"; | 11 | LPCWSTR wzQUERY_REGISTRY = L"SELECT `Registry`.`Registry`, `Registry`.`Root`, `Registry`.`Key` FROM `Registry` WHERE `Registry`.`Registry`=?"; |
| @@ -142,7 +142,7 @@ static HRESULT StoreACLRollbackInfo( | |||
| 142 | ExitOnFailure(hr, "failed to add data to rollback CustomActionData"); | 142 | ExitOnFailure(hr, "failed to add data to rollback CustomActionData"); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecSecureObjectsRollback"), pwzCustomActionData, COST_SECUREOBJECT); | 145 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecSecureObjectsRollback"), pwzCustomActionData, COST_SECUREOBJECT); |
| 146 | ExitOnFailure(hr, "failed to schedule ExecSecureObjectsRollback for item: %ls of type: %ls", pwzObject, pwzTable); | 146 | ExitOnFailure(hr, "failed to schedule ExecSecureObjectsRollback for item: %ls of type: %ls", pwzObject, pwzTable); |
| 147 | 147 | ||
| 148 | ReleaseStr(pwzCustomActionData); | 148 | ReleaseStr(pwzCustomActionData); |
| @@ -343,9 +343,9 @@ extern "C" UINT __stdcall SchedSecureObjects( | |||
| 343 | ExitOnFailure(hr, "failed to initialize"); | 343 | ExitOnFailure(hr, "failed to initialize"); |
| 344 | 344 | ||
| 345 | // anything to do? | 345 | // anything to do? |
| 346 | if (S_OK != WcaTableExists(L"SecureObjects")) | 346 | if (S_OK != WcaTableExists(L"Wix4SecureObject")) |
| 347 | { | 347 | { |
| 348 | WcaLog(LOGMSG_STANDARD, "SecureObjects table doesn't exist, so there are no objects to secure."); | 348 | WcaLog(LOGMSG_STANDARD, "Wix4SecureObject table doesn't exist, so there are no objects to secure."); |
| 349 | ExitFunction(); | 349 | ExitFunction(); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| @@ -353,7 +353,7 @@ extern "C" UINT __stdcall SchedSecureObjects( | |||
| 353 | // loop through all the objects to be secured | 353 | // loop through all the objects to be secured |
| 354 | // | 354 | // |
| 355 | hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView); | 355 | hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView); |
| 356 | ExitOnFailure(hr, "failed to open view on SecureObjects table"); | 356 | ExitOnFailure(hr, "failed to open view on Wix4SecureObject table"); |
| 357 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) | 357 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) |
| 358 | { | 358 | { |
| 359 | hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable); | 359 | hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable); |
| @@ -372,7 +372,7 @@ extern "C" UINT __stdcall SchedSecureObjects( | |||
| 372 | 372 | ||
| 373 | BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit; | 373 | BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit; |
| 374 | 374 | ||
| 375 | // Only process entries in the SecureObjects table whose components match the bitness of this CA | 375 | // Only process entries in the Wix4SecureObject table whose components match the bitness of this CA |
| 376 | #ifdef _WIN64 | 376 | #ifdef _WIN64 |
| 377 | if (!fIs64Bit) | 377 | if (!fIs64Bit) |
| 378 | { | 378 | { |
| @@ -444,7 +444,7 @@ extern "C" UINT __stdcall SchedSecureObjects( | |||
| 444 | { | 444 | { |
| 445 | Assert(0 < cObjects); | 445 | Assert(0 < cObjects); |
| 446 | 446 | ||
| 447 | hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecSecureObjects"), pwzCustomActionData, cObjects * COST_SECUREOBJECT); | 447 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecSecureObjects"), pwzCustomActionData, cObjects * COST_SECUREOBJECT); |
| 448 | ExitOnFailure(hr, "failed to schedule ExecSecureObjects action"); | 448 | ExitOnFailure(hr, "failed to schedule ExecSecureObjects action"); |
| 449 | } | 449 | } |
| 450 | 450 | ||
| @@ -497,7 +497,7 @@ extern "C" UINT __stdcall SchedSecureObjectsRollback( | |||
| 497 | // loop through all the objects to be secured | 497 | // loop through all the objects to be secured |
| 498 | // | 498 | // |
| 499 | hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView); | 499 | hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView); |
| 500 | ExitOnFailure(hr, "failed to open view on SecureObjects table"); | 500 | ExitOnFailure(hr, "failed to open view on Wix4SecureObject table"); |
| 501 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) | 501 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) |
| 502 | { | 502 | { |
| 503 | hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable); | 503 | hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable); |
| @@ -516,7 +516,7 @@ extern "C" UINT __stdcall SchedSecureObjectsRollback( | |||
| 516 | 516 | ||
| 517 | BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit; | 517 | BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit; |
| 518 | 518 | ||
| 519 | // Only process entries in the SecureObjects table whose components match the bitness of this CA | 519 | // Only process entries in the Wix4SecureObject table whose components match the bitness of this CA |
| 520 | #ifdef _WIN64 | 520 | #ifdef _WIN64 |
| 521 | if (!fIs64Bit) | 521 | if (!fIs64Bit) |
| 522 | { | 522 | { |
