⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 150089 in webkit


Ignore:
Timestamp:
May 14, 2013, 3:08:53 PM (13 years ago)
Author:
ap@apple.com
Message:

[Mac] Add a testing shim for secure event input functions
​https://bugs.webkit.org/show_bug.cgi?id=116122

Reviewed by Mark Rowe.

Added a new target with a dynamic library that interposes secure event input functions.
We need this to avoid interfering with user session state.

  • Configurations/WebCoreTestShim.xcconfig: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
  • testing/WebCoreTestShimLibrary.cpp: Added. (shimEnableSecureEventInput): (shimDisableSecureEventInput): (shimIsSecureEventInputEnabled):
Location:
trunk
Files:
2 added
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150088 r150089  
     12013-05-14  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] Add a testing shim for secure event input functions
     4        https://bugs.webkit.org/show_bug.cgi?id=116122
     5
     6        Reviewed by Mark Rowe.
     7
     8        Added a new target with a dynamic library that interposes secure event input functions.
     9        We need this to avoid interfering with user session state.
     10
     11        * Configurations/WebCoreTestShim.xcconfig: Added.
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
     14        * testing/WebCoreTestShimLibrary.cpp: Added.
     15        (shimEnableSecureEventInput):
     16        (shimDisableSecureEventInput):
     17        (shimIsSecureEventInputEnabled):
     18
    1192013-05-14  Benjamin Poulain  <bpoulain@apple.com>
    220
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r150053 r150089  
    1616                                41816F8313859C7A0057AAA4 /* PBXTargetDependency */,
    1717                                41816F8513859C7D0057AAA4 /* PBXTargetDependency */,
     18                                E1BA671C1742CBF800C20251 /* PBXTargetDependency */,
    1819                        );
    1920                        name = All;
    … …  
    54695470                E1B784201639CBBE0007B692 /* SharedWorkerRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B7841F1639CBBE0007B692 /* SharedWorkerRepository.cpp */; };
    54705471                E1BA003116FB92AC00BA7A35 /* ResourceHandleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BA003016FB92AC00BA7A35 /* ResourceHandleClient.cpp */; };
     5472                E1BA66F11742BD8600C20251 /* DynamicLinkerInterposing.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BA66F01742BD8600C20251 /* DynamicLinkerInterposing.h */; settings = {ATTRIBUTES = (Private, ); }; };
     5473                E1BA67181742BEE600C20251 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869402846DCD018635CA /* Carbon.framework */; };
     5474                E1BA671A1742BEF400C20251 /* WebCoreTestShimLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */; };
    54715475                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */; };
    54725476                E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */; };
    … …  
    60826086                        remoteGlobalIDString = DD041FBE09D9DDBE0010AF2A;
    60836087                        remoteInfo = "Derived Sources";
     6088                };
     6089                E1BA66F51742BDE000C20251 /* PBXContainerItemProxy */ = {
     6090                        isa = PBXContainerItemProxy;
     6091                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     6092                        proxyType = 1;
     6093                        remoteGlobalIDString = 93F198A508245E59001E9ABC;
     6094                        remoteInfo = WebCore;
     6095                };
     6096                E1BA671B1742CBF800C20251 /* PBXContainerItemProxy */ = {
     6097                        isa = PBXContainerItemProxy;
     6098                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     6099                        proxyType = 1;
     6100                        remoteGlobalIDString = E1BA66F31742BDE000C20251;
     6101                        remoteInfo = WebCoreTestShim;
    60846102                };
    60856103/* End PBXContainerItemProxy section */
    … …  
    1040910427                AA4C3A740B2B1679002334A2 /* StyleElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StyleElement.cpp; sourceTree = "<group>"; };
    1041010428                AA4C3A750B2B1679002334A2 /* StyleElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StyleElement.h; sourceTree = "<group>"; };
    10411                 AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = ../../../../../System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<group>"; };
     10429                AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
    1041210430                AA73183C159255B900A93E6E /* InjectedScriptCanvasModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedScriptCanvasModule.cpp; sourceTree = "<group>"; };
    1041310431                AA73183D159255B900A93E6E /* InjectedScriptCanvasModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptCanvasModule.h; sourceTree = "<group>"; };
    … …  
    1228312301                E1B7841F1639CBBE0007B692 /* SharedWorkerRepository.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedWorkerRepository.cpp; path = workers/SharedWorkerRepository.cpp; sourceTree = "<group>"; };
    1228412302                E1BA003016FB92AC00BA7A35 /* ResourceHandleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandleClient.cpp; sourceTree = "<group>"; };
     12303                E1BA66F01742BD8600C20251 /* DynamicLinkerInterposing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLinkerInterposing.h; sourceTree = "<group>"; };
     12304                E1BA66F21742BDCC00C20251 /* WebCoreTestShim.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebCoreTestShim.xcconfig; sourceTree = "<group>"; };
     12305                E1BA67161742BDE000C20251 /* libWebCoreTestShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libWebCoreTestShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
     12306                E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreTestShimLibrary.cpp; sourceTree = "<group>"; };
    1228512307                E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSLTUnicodeSort.cpp; sourceTree = "<group>"; };
    1228612308                E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTUnicodeSort.h; sourceTree = "<group>"; };
    … …  
    1296512987                        runOnlyForDeploymentPostprocessing = 0;
    1296612988                };
     12989                E1BA670E1742BDE000C20251 /* Frameworks */ = {
     12990                        isa = PBXFrameworksBuildPhase;
     12991                        buildActionMask = 2147483647;
     12992                        files = (
     12993                                E1BA67181742BEE600C20251 /* Carbon.framework in Frameworks */,
     12994                        );
     12995                        runOnlyForDeploymentPostprocessing = 0;
     12996                };
    1296712997/* End PBXFrameworksBuildPhase section */
    1296812998
    … …  
    1298813018                                417DA6D013734E02007C57FB /* libWebCoreTestSupport.dylib */,
    1298913019                                93F19B1A08245E5A001E9ABC /* WebCore.framework */,
     13020                                E1BA67161742BDE000C20251 /* libWebCoreTestShim.dylib */,
    1299013021                        );
    1299113022                        name = Products;
    … …  
    1369513726                                1C904DF90BA9D2C80081E9D0 /* Version.xcconfig */,
    1369613727                                1CDD45E50BA9C84600F90147 /* WebCore.xcconfig */,
     13728                                E1BA66F21742BDCC00C20251 /* WebCoreTestShim.xcconfig */,
    1369713729                                4181707D1386EDF20057AAA4 /* WebCoreTestSupport.xcconfig */,
    1369813730                        );
    … …  
    1395913991                                EB081CD81696084400553730 /* TypeConversions.h */,
    1396013992                                EB081CD91696084400553730 /* TypeConversions.idl */,
     13993                                E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */,
    1396113994                        );
    1396213995                        path = testing;
    … …  
    1460214635                                A795463D0B5C4C80007B438F /* DragDataMac.mm */,
    1460314636                                A7CFB3D40B7ED1180070C32D /* DragImageMac.mm */,
     14637                                E1BA66F01742BD8600C20251 /* DynamicLinkerInterposing.h */,
    1460414638                                5DC87EEF11716DF2001C0E6D /* EmptyProtocolDefinitions.h */,
    1460514639                                1CA19E030DC255950065A994 /* EventLoopMac.mm */,
    … …  
    2380023834                                CECADFCE1537791D00E37068 /* TextInsertionBaseCommand.h in Headers */,
    2380123835                                93309E1C099E64920056E581 /* TextIterator.h in Headers */,
     23836                                E1BA66F11742BD8600C20251 /* DynamicLinkerInterposing.h in Headers */,
    2380223837                                BCEF45E90E687767001C1287 /* TextMetrics.h in Headers */,
    2380323838                                930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */,
    … …  
    2407524110                        runOnlyForDeploymentPostprocessing = 0;
    2407624111                };
     24112                E1BA66F61742BDE000C20251 /* Headers */ = {
     24113                        isa = PBXHeadersBuildPhase;
     24114                        buildActionMask = 2147483647;
     24115                        files = (
     24116                        );
     24117                        runOnlyForDeploymentPostprocessing = 0;
     24118                };
    2407724119/* End PBXHeadersBuildPhase section */
    2407824120
    … …  
    2414224184                        productType = "com.apple.product-type.framework";
    2414324185                };
     24186                E1BA66F31742BDE000C20251 /* WebCoreTestShim */ = {
     24187                        isa = PBXNativeTarget;
     24188                        buildConfigurationList = E1BA67121742BDE000C20251 /* Build configuration list for PBXNativeTarget "WebCoreTestShim" */;
     24189                        buildPhases = (
     24190                                E1BA66F61742BDE000C20251 /* Headers */,
     24191                                E1BA67021742BDE000C20251 /* Sources */,
     24192                                E1BA670E1742BDE000C20251 /* Frameworks */,
     24193                        );
     24194                        buildRules = (
     24195                        );
     24196                        dependencies = (
     24197                                E1BA66F41742BDE000C20251 /* PBXTargetDependency */,
     24198                        );
     24199                        name = WebCoreTestShim;
     24200                        productName = WebCoreTestSupport;
     24201                        productReference = E1BA67161742BDE000C20251 /* libWebCoreTestShim.dylib */;
     24202                        productType = "com.apple.product-type.library.dynamic";
     24203                };
    2414424204/* End PBXNativeTarget section */
    2414524205
    … …  
    2417524235                                5D87BB6411E3EBC100702B6F /* WebCoreExportFileGenerator Generator */,
    2417624236                                417DA6CF13734E02007C57FB /* WebCoreTestSupport */,
     24237                                E1BA66F31742BDE000C20251 /* WebCoreTestShim */,
    2417724238                        );
    2417824239                };
    … …  
    2703227093                        runOnlyForDeploymentPostprocessing = 0;
    2703327094                };
     27095                E1BA67021742BDE000C20251 /* Sources */ = {
     27096                        isa = PBXSourcesBuildPhase;
     27097                        buildActionMask = 2147483647;
     27098                        files = (
     27099                                E1BA671A1742BEF400C20251 /* WebCoreTestShimLibrary.cpp in Sources */,
     27100                        );
     27101                        runOnlyForDeploymentPostprocessing = 0;
     27102                };
    2703427103/* End PBXSourcesBuildPhase section */
    2703527104
    … …  
    2706427133                        target = DD041FBE09D9DDBE0010AF2A /* Derived Sources */;
    2706527134                        targetProxy = DD041FF009D9E3250010AF2A /* PBXContainerItemProxy */;
     27135                };
     27136                E1BA66F41742BDE000C20251 /* PBXTargetDependency */ = {
     27137                        isa = PBXTargetDependency;
     27138                        target = 93F198A508245E59001E9ABC /* WebCore */;
     27139                        targetProxy = E1BA66F51742BDE000C20251 /* PBXContainerItemProxy */;
     27140                };
     27141                E1BA671C1742CBF800C20251 /* PBXTargetDependency */ = {
     27142                        isa = PBXTargetDependency;
     27143                        target = E1BA66F31742BDE000C20251 /* WebCoreTestShim */;
     27144                        targetProxy = E1BA671B1742CBF800C20251 /* PBXContainerItemProxy */;
    2706627145                };
    2706727146/* End PBXTargetDependency section */
    … …  
    2726227341                        name = Production;
    2726327342                };
     27343                E1BA67131742BDE000C20251 /* Debug */ = {
     27344                        isa = XCBuildConfiguration;
     27345                        baseConfigurationReference = E1BA66F21742BDCC00C20251 /* WebCoreTestShim.xcconfig */;
     27346                        buildSettings = {
     27347                        };
     27348                        name = Debug;
     27349                };
     27350                E1BA67141742BDE000C20251 /* Release */ = {
     27351                        isa = XCBuildConfiguration;
     27352                        baseConfigurationReference = E1BA66F21742BDCC00C20251 /* WebCoreTestShim.xcconfig */;
     27353                        buildSettings = {
     27354                        };
     27355                        name = Release;
     27356                };
     27357                E1BA67151742BDE000C20251 /* Production */ = {
     27358                        isa = XCBuildConfiguration;
     27359                        baseConfigurationReference = E1BA66F21742BDCC00C20251 /* WebCoreTestShim.xcconfig */;
     27360                        buildSettings = {
     27361                        };
     27362                        name = Production;
     27363                };
    2726427364/* End XCBuildConfiguration section */
    2726527365
    … …  
    2733527435                        defaultConfigurationName = Production;
    2733627436                };
     27437                E1BA67121742BDE000C20251 /* Build configuration list for PBXNativeTarget "WebCoreTestShim" */ = {
     27438                        isa = XCConfigurationList;
     27439                        buildConfigurations = (
     27440                                E1BA67131742BDE000C20251 /* Debug */,
     27441                                E1BA67141742BDE000C20251 /* Release */,
     27442                                E1BA67151742BDE000C20251 /* Production */,
     27443                        );
     27444                        defaultConfigurationIsVisible = 0;
     27445                        defaultConfigurationName = Production;
     27446                };
    2733727447/* End XCConfigurationList section */
    2733827448        };
  • trunk/Source/WebKit2/ChangeLog

    r150079 r150089  
     12013-05-14  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] Add a testing shim for secure event input functions
     4        https://bugs.webkit.org/show_bug.cgi?id=116122
     5
     6        Reviewed by Mark Rowe.
     7
     8        Moved DyldInterpose.h to WebCore, as we now use it there too.
     9
     10        * PluginProcess/mac/PluginProcessShim.mm:
     11        * Shared/mac/CookieStorageShimLibrary.cpp:
     12        * Shared/mac/DyldInterpose.h: Removed.
     13        * WebKit2.xcodeproj/project.pbxproj:
     14        * WebProcess/mac/SecItemShimLibrary.mm:
     15
    1162013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
    217
  • trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm

    r149074 r150089  
    2727#import "PluginProcessShim.h"
    2828
    29 #import "DYLDInterpose.h"
    3029#import <AppKit/AppKit.h>
    3130#import <Carbon/Carbon.h>
     31#import <WebCore/DynamicLinkerInterposing.h>
    3232#import <WebKitSystemInterface.h>
    3333#import <stdio.h>
  • trunk/Source/WebKit2/Shared/mac/CookieStorageShimLibrary.cpp

    r149107 r150089  
    2929#if ENABLE(NETWORK_PROCESS)
    3030
    31 #include "DyldInterpose.h"
     31#include <WebCore/DynamicLinkerInterposing.h>
    3232
    3333extern "C" CFDictionaryRef _CFHTTPCookieStorageCopyRequestHeaderFieldsForURL(CFAllocatorRef inAllocator, CFHTTPCookieStorageRef inCookieStorage, CFURLRef inRequestURL);
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r149919 r150089  
    26132613                C574A57F12E66681002DFE98 /* PasteboardTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PasteboardTypes.h; sourceTree = "<group>"; };
    26142614                C574A58012E66681002DFE98 /* PasteboardTypes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardTypes.mm; sourceTree = "<group>"; };
    2615                 CD471F5B1721B99900D65CDA /* DyldInterpose.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DyldInterpose.h; sourceTree = "<group>"; };
    26162615                CD471F5C1721BC3E00D65CDA /* libWTF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libWTF.a; path = ../../../../../../../../usr/local/lib/libWTF.a; sourceTree = "<group>"; };
    26172616                CD5C669E134B9D36004FE2A8 /* InjectedBundlePageFullScreenClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageFullScreenClient.cpp; sourceTree = "<group>"; };
    … …  
    43224321                                CDC3830D1721242D008A2FC3 /* CookieStorageShim.cpp */,
    43234322                                CDC3830E1721242D008A2FC3 /* CookieStorageShim.h */,
    4324                                 CD471F5B1721B99900D65CDA /* DyldInterpose.h */,
    43254323                                1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */,
    43264324                                C02BFF1D1251502E009CCBEA /* NativeWebKeyboardEventMac.mm */,
  • trunk/Source/WebKit2/WebProcess/mac/SecItemShimLibrary.mm

    r149107 r150089  
    2525#import "SecItemShimLibrary.h"
    2626
    27 #import "DyldInterpose.h"
    2827#import <Security/SecItem.h>
     28#import <WebCore/DynamicLinkerInterposing.h>
    2929#import <wtf/Platform.h>
    3030
  • trunk/Tools/ChangeLog

    r150080 r150089  
     12013-05-14  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] Add a testing shim for secure event input functions
     4        https://bugs.webkit.org/show_bug.cgi?id=116122
     5
     6        Reviewed by Mark Rowe.
     7
     8        * Scripts/webkitpy/port/mac.py: (MacPort.setup_environ_for_server):
     9        Inject WebCore testing shim library to override system framework functions.
     10
    1112013-05-14  Brent Fulgham  <bfulgham@apple.com>
    212
  • trunk/Tools/Scripts/webkitpy/port/mac.py

    r149967 r150089  
    9595                env['MallocStackLogging'] = '1'
    9696            if self.get_option('guard_malloc'):
    97                 env['DYLD_INSERT_LIBRARIES'] = '/usr/lib/libgmalloc.dylib'
     97                env['DYLD_INSERT_LIBRARIES'] = '/usr/lib/libgmalloc.dylib:' + self._build_path("libWebCoreTestShim.dylib")
     98            else:
     99                env['DYLD_INSERT_LIBRARIES'] = self._build_path("libWebCoreTestShim.dylib")
    98100        env['XML_CATALOG_FILES'] = ''  # work around missing /etc/catalog <rdar://problem/4292995>
    99101        return env
Note: See TracChangeset for help on using the changeset viewer.