Commit 86ef6918 authored by Georg Koppen's avatar Georg Koppen Committed by Matthew Finkel
Browse files

Revert "Bug 1574980 - Fix issues with maintenance service install. r=bytesized a=jcristau"

We don't use the maintenance service and don't want to have parts of it
now included in our updater code. This commit fixes bug 31547 for esr68.
parent 4a53e567
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -246,6 +246,15 @@ BOOL FixServicePath(SC_HANDLE service, LPCWSTR currentServicePath,
 * @return TRUE if the service was installed/upgraded
 */
BOOL SvcInstall(SvcInstallAction action) {
  mozilla::UniquePtr<wchar_t[]> updateDir;
  HRESULT permResult = GetCommonUpdateDirectory(
      nullptr, SetPermissionsOf::FilesAndDirsWithBadPerms, updateDir);
  if (FAILED(permResult)) {
    LOG_WARN(
        ("Unable to set the permissions on the update directory ('%S'): %d",
         updateDir.get(), permResult));
  }

  // Get a handle to the local computer SCM database with full access rights.
  nsAutoServiceHandle schSCManager(
      OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS));
+14 −6
Original line number Diff line number Diff line
@@ -14,14 +14,17 @@ EXPORTS += [

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    EXPORTS += [
        'certificatecheck.h',
        'pathhash.h',
        'registrycertificates.h',
        'uachelper.h',
        'updatehelper.cpp',
        'updatehelper.h',
        'updateutils_win.h',
    ]
    if CONFIG['MOZ_MAINTENANCE_SERVICE']:
        EXPORTS += [
            'certificatecheck.h',
            'registrycertificates.h',
        ]

Library('updatecommon')

@@ -32,19 +35,24 @@ DisableStlWrapping()

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    SOURCES += [
        'certificatecheck.cpp',
        'pathhash.cpp',
        'registrycertificates.cpp',
        'uachelper.cpp',
        'updatehelper.cpp',
        'updateutils_win.cpp',
    ]
    OS_LIBS += [
        'advapi32',
        'crypt32',
        'ole32',
        'rpcrt4',
        'shell32',
    ]
    if CONFIG['MOZ_MAINTENANCE_SERVICE']:
        SOURCES += [
            'certificatecheck.cpp',
            'registrycertificates.cpp',
        ]
        OS_LIBS += [
            'crypt32',
            'wintrust',
        ]

+0 −9
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
#  include "mozilla/UniquePtr.h"
#  include "pathhash.h"
#  include "shlobj.h"
#  include "registrycertificates.h"
#  include "uachelper.h"
#  include "updatehelper.h"
#  include "updateutils_win.h"
@@ -334,14 +333,6 @@ BOOL StartServiceUpdate(LPCWSTR installDir) {
    return FALSE;
  }

  // Check that the copied file's certificate matches the expected name and
  // issuer stored in the registry for this installation and that the
  // certificate is trusted by the system's certificate store.
  if (!DoesBinaryMatchAllowedCertificates(installDir, tmpService)) {
    DeleteFileW(tmpService);
    return FALSE;
  }

  // Start the upgrade comparison process
  STARTUPINFOW si = {0};
  si.cb = sizeof(STARTUPINFOW);