mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Bug 867056. r=rstrong
This commit is contained in:
parent
c38b9cfe12
commit
d49fae1093
@ -587,16 +587,19 @@ ExecuteServiceCommand(int argc, LPWSTR *argv)
|
||||
oldUpdaterPath, secureUpdaterPath));
|
||||
DeleteSecureUpdater(secureUpdaterPath);
|
||||
result = CopyFileW(oldUpdaterPath, secureUpdaterPath, FALSE);
|
||||
if (!result) {
|
||||
LOG_WARN(("Could not copy path to secure location. (%d)",
|
||||
GetLastError()));
|
||||
}
|
||||
}
|
||||
|
||||
// If we obtained the path and copied it successfully update the path to
|
||||
// use for the service update. If there was a problem use the original
|
||||
// path so things work like it used to.
|
||||
if (result) {
|
||||
if (!result) {
|
||||
LOG_WARN(("Could not copy path to secure location. (%d)",
|
||||
GetLastError()));
|
||||
if (argc > 4 && !WriteStatusFailure(argv[4],
|
||||
SERVICE_COULD_NOT_COPY_UPDATER)) {
|
||||
LOG_WARN(("Could not write update.status could not copy updater error"));
|
||||
}
|
||||
} else {
|
||||
|
||||
// We obtained the path and copied it successfully, update the path to
|
||||
// use for the service update.
|
||||
argv[3] = secureUpdaterPath;
|
||||
|
||||
WCHAR oldUpdaterINIPath[MAX_PATH + 1] = { L'\0' };
|
||||
@ -611,10 +614,10 @@ ExecuteServiceCommand(int argc, LPWSTR *argv)
|
||||
oldUpdaterINIPath, secureUpdaterINIPath, GetLastError()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = ProcessSoftwareUpdateCommand(argc - 3, argv + 3);
|
||||
DeleteSecureUpdater(secureUpdaterPath);
|
||||
result = ProcessSoftwareUpdateCommand(argc - 3, argv + 3);
|
||||
DeleteSecureUpdater(secureUpdaterPath);
|
||||
}
|
||||
|
||||
// We might not reach here if the service install succeeded
|
||||
// because the service self updates itself and the service
|
||||
|
@ -51,6 +51,7 @@
|
||||
#define SERVICE_UPDATER_NOT_FIXED_DRIVE 31
|
||||
#define SERVICE_COULD_NOT_LOCK_UPDATER 32
|
||||
#define SERVICE_INSTALLDIR_ERROR 33
|
||||
#define SERVICE_COULD_NOT_COPY_UPDATER 49
|
||||
|
||||
#define NO_INSTALLDIR_ERROR 34
|
||||
#define WRITE_ERROR_ACCESS_DENIED 35
|
||||
|
@ -136,6 +136,7 @@ const SERVICE_STILL_APPLYING_ON_FAILURE = 30;
|
||||
const SERVICE_UPDATER_NOT_FIXED_DRIVE = 31;
|
||||
const SERVICE_COULD_NOT_LOCK_UPDATER = 32;
|
||||
const SERVICE_INSTALLDIR_ERROR = 33;
|
||||
const SERVICE_COULD_NOT_COPY_UPDATER = 49;
|
||||
|
||||
const WRITE_ERROR_ACCESS_DENIED = 35;
|
||||
// const WRITE_ERROR_SHARING_VIOLATION = 36; // Replaced with errors 46-48
|
||||
@ -152,7 +153,6 @@ const WRITE_ERROR_SHARING_VIOLATION_SIGNALED = 46;
|
||||
const WRITE_ERROR_SHARING_VIOLATION_NOPROCESSFORPID = 47;
|
||||
const WRITE_ERROR_SHARING_VIOLATION_NOPID = 48;
|
||||
|
||||
|
||||
const CERT_ATTR_CHECK_FAILED_NO_UPDATE = 100;
|
||||
const CERT_ATTR_CHECK_FAILED_HAS_UPDATE = 101;
|
||||
const BACKGROUNDCHECK_MULTIPLE_FAILURES = 110;
|
||||
@ -1305,6 +1305,7 @@ function handleUpdateFailure(update, errorCode) {
|
||||
update.errorCode == SERVICE_STILL_APPLYING_ON_FAILURE ||
|
||||
update.errorCode == SERVICE_UPDATER_NOT_FIXED_DRIVE ||
|
||||
update.errorCode == SERVICE_COULD_NOT_LOCK_UPDATER ||
|
||||
update.errorCode == SERVICE_COULD_NOT_COPY_UPDATER ||
|
||||
update.errorCode == SERVICE_INSTALLDIR_ERROR) {
|
||||
|
||||
var failCount = getPref("getIntPref",
|
||||
|
Loading…
Reference in New Issue
Block a user