Changeset 248731 in webkit


Ignore:
Timestamp:
Aug 15, 2019 11:02:34 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r248440.
https://bugs.webkit.org/show_bug.cgi?id=200772

Introduced regressions related to loading of local files.
(Requested by perarne on #webkit).

Reverted changeset:

"[Mac] Use the PID of the WebContent process when issuing
local file read sandbox extensions"
https://bugs.webkit.org/show_bug.cgi?id=200543
https://trac.webkit.org/changeset/248440

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r248702 r248731  
     12019-08-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r248440.
     4        https://bugs.webkit.org/show_bug.cgi?id=200772
     5
     6        Introduced regressions related to loading of local files.
     7        (Requested by perarne on #webkit).
     8
     9        Reverted changeset:
     10
     11        "[Mac] Use the PID of the WebContent process when issuing
     12        local file read sandbox extensions"
     13        https://bugs.webkit.org/show_bug.cgi?id=200543
     14        https://trac.webkit.org/changeset/248440
     15
    1162019-08-14  Kate Cheney  <katherine_cheney@apple.com>
    217
  • trunk/Source/WTF/wtf/Platform.h

    r248697 r248731  
    15311531#endif
    15321532
    1533 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
    1534 #define HAVE_SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID 1
    1535 #endif
    1536 
    15371533#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
    15381534#define HAVE_MDNS_FAST_REGISTRATION 1
  • trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h

    r248697 r248731  
    6262char *sandbox_extension_issue_generic(const char *extension_class, uint32_t flags);
    6363char *sandbox_extension_issue_mach_to_process_by_pid(const char *extension_class, const char *name, uint32_t flags, pid_t);
    64 char *sandbox_extension_issue_file_to_process_by_pid(const char *extension_class, const char *path, uint32_t flags, pid_t);
    6564int sandbox_check(pid_t, const char *operation, enum sandbox_filter_type, ...);
    6665int sandbox_check_by_audit_token(audit_token_t, const char *operation, enum sandbox_filter_type, ...);
  • trunk/Source/WebKit/ChangeLog

    r248717 r248731  
     12019-08-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r248440.
     4        https://bugs.webkit.org/show_bug.cgi?id=200772
     5
     6        Introduced regressions related to loading of local files.
     7        (Requested by perarne on #webkit).
     8
     9        Reverted changeset:
     10
     11        "[Mac] Use the PID of the WebContent process when issuing
     12        local file read sandbox extensions"
     13        https://bugs.webkit.org/show_bug.cgi?id=200543
     14        https://trac.webkit.org/changeset/248440
     15
    1162019-08-15  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm

    r248440 r248731  
    101101        case SandboxExtension::Type::Generic:
    102102            return sandbox_extension_issue_generic(path, 0);
    103         case SandboxExtension::Type::ReadByPid:
    104 #if HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)
    105             return sandbox_extension_issue_file_to_process_by_pid(APP_SANDBOX_READ, path, 0, pid.value());
    106 #else
    107             UNUSED_PARAM(pid);
    108             ASSERT_NOT_REACHED();
    109             return nullptr;
    110 #endif
    111103        }
    112104    }
     
    345337}
    346338
    347 bool SandboxExtension::createHandleForReadByPid(const String& path, ProcessID pid, Handle& handle)
    348 {
    349     ASSERT(!handle.m_sandboxExtension);
    350    
    351     handle.m_sandboxExtension = SandboxExtensionImpl::create(path.utf8().data(), Type::ReadByPid, pid);
    352     if (!handle.m_sandboxExtension) {
    353         WTFLogAlways("Could not create a '%s' sandbox extension", path.utf8().data());
    354         return false;
    355     }
    356    
    357     return true;
    358 }
    359 
    360339SandboxExtension::SandboxExtension(const Handle& handle)
    361340    : m_sandboxExtension(WTFMove(handle.m_sandboxExtension))
  • trunk/Source/WebKit/Shared/SandboxExtension.h

    r248440 r248731  
    5050        Mach,
    5151        Generic,
    52         ReadByPid
    5352    };
    5453
     
    106105    static bool createHandleForGenericExtension(const String& extensionClass, Handle&);
    107106    static bool createHandleForMachLookupByPid(const String& service, ProcessID, Handle&);
    108     static bool createHandleForReadByPid(const String& path, ProcessID, Handle&);
    109107    ~SandboxExtension();
    110108
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r248713 r248731  
    10771077    ASSERT_WITH_SECURITY_IMPLICATION(!WebKit::isInspectorPage(*this));
    10781078
    1079 #if PLATFORM(MAC) && HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)
    1080     if (SandboxExtension::createHandleForReadByPid("/", processIdentifier(), sandboxExtensionHandle)) {
    1081 #else
    10821079    if (SandboxExtension::createHandle("/", SandboxExtension::Type::ReadOnly, sandboxExtensionHandle)) {
    1083 #endif
    10841080        willAcquireUniversalFileReadSandboxExtension(process);
    10851081        return;
     
    10941090    auto baseURL = URL(URL(), url.baseAsString());
    10951091    auto basePath = baseURL.fileSystemPath();
    1096     if (basePath.isNull())
    1097         return;
    1098 #if PLATFORM(MAC) && HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)
    1099     if (SandboxExtension::createHandleForReadByPid(basePath, processIdentifier(), sandboxExtensionHandle))
    1100 #else
    1101     if (SandboxExtension::createHandle(basePath, SandboxExtension::Type::ReadOnly, sandboxExtensionHandle))
    1102 #endif
     1092    if (!basePath.isNull() && SandboxExtension::createHandle(basePath, SandboxExtension::Type::ReadOnly, sandboxExtensionHandle))
    11031093        m_process->assumeReadAccessToBaseURL(*this, baseURL);
    11041094}
Note: See TracChangeset for help on using the changeset viewer.