Bug 523410 - Disable LSPs in WinSock that don't have categories for Firefox on Windows Vista and above. r=khuey, a=blocking2.0-beta4

This commit is contained in:
Robert Strong
2010-08-12 21:09:06 -07:00
parent 1436603ad2
commit c7779e7d2a
5 changed files with 159 additions and 14 deletions

View File

@@ -22,6 +22,14 @@
!define PreReleaseSuffix "@PRE_RELEASE_SUFFIX@"
!define BrandFullName "${BrandFullNameInternal}${PreReleaseSuffix}"
# LSP_CATEGORIES is the permitted LSP categories for the application. Each LSP
# category value is ANDed together to set multiple permitted categories.
# See http://msdn.microsoft.com/en-us/library/ms742253%28VS.85%29.aspx
# The value below permits the LSP_INSPECTOR, LSP_REDIRECTOR, LSP_PROXY,
# LSP_FIREWALL, LSP_INBOUND_MODIFY, LSP_OUTBOUND_MODIFY, LSP_CRYPTO_COMPRESS,
# and LSP_LOCAL_CACHE LSP categories.
!define LSP_CATEGORIES "0x000000ff"
# NO_INSTDIR_FROM_REG is defined for pre-releases which have a PreReleaseSuffix
# (e.g. Alpha X, Beta X, etc.) to prevent finding a non-default installation
# directory in the registry and using that as the default. This prevents

View File

@@ -113,6 +113,7 @@ VIAddVersionKey "OriginalFilename" "setup.exe"
!insertmacro RegCleanAppHandler
!insertmacro RegCleanMain
!insertmacro RegCleanUninstall
!insertmacro SetAppLSPCategories
!insertmacro SetBrandNameVars
!insertmacro UpdateShortcutAppModelIDs
!insertmacro UnloadUAC
@@ -374,7 +375,6 @@ Section "-Application" APP_IDX
${If} $TmpVal == "HKLM"
; Set the Start Menu Internet and Vista Registered App HKLM registry keys.
${SetStartMenuInternet}
${FixShellIconHandler}
; If we are writing to HKLM and create the quick launch and the desktop
@@ -398,6 +398,11 @@ Section "-Application" APP_IDX
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\$R9"
${CreateRegKey} "$TmpVal" "$0" 0
${If} $TmpVal == "HKLM"
; Set the permitted LSP Categories for WinVista and above
${SetAppLSPCategories} ${LSP_CATEGORIES}
${EndIf}
; Create shortcuts
${LogHeader} "Adding Shortcuts"

View File

@@ -57,6 +57,7 @@
${RegCleanUninstall}
${UpdateProtocolHandlers}
${FixShellIconHandler}
${SetAppLSPCategories} ${LSP_CATEGORIES}
; Only update the Clients\StartMenuInternet registry key values if they
; don't exist or this installation is the same as the one set in those keys.

View File

@@ -100,6 +100,7 @@ VIAddVersionKey "OriginalFilename" "helper.exe"
!insertmacro RegCleanAppHandler
!insertmacro RegCleanMain
!insertmacro RegCleanUninstall
!insertmacro SetAppLSPCategories
!insertmacro SetBrandNameVars
!insertmacro UpdateShortcutAppModelIDs
!insertmacro UnloadUAC
@@ -122,6 +123,7 @@ VIAddVersionKey "OriginalFilename" "helper.exe"
!insertmacro un.RegCleanUninstall
!insertmacro un.RegCleanProtocolHandler
!insertmacro un.RemoveQuotesFromPath
!insertmacro un.SetAppLSPCategories
!insertmacro un.SetBrandNameVars
!include shared.nsh
@@ -240,6 +242,7 @@ Section "Uninstall"
${un.RegCleanMain} "Software\Mozilla"
${un.RegCleanUninstall}
${un.DeleteShortcuts}
${un.SetAppLSPCategories}
${EndIf}
${un.RegCleanAppHandler} "FirefoxURL"