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

Changeset 248744 in webkit


Ignore:
Timestamp:
Aug 15, 2019, 1:50:00 PM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r248731. rdar://problem/54360857

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248731 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-608-branch/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608-branch/Source/WTF/ChangeLog

    r248628 r248744  
     12019-08-15  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r248731. rdar://problem/54360857
     4
     5    Unreviewed, rolling out r248440.
     6    https://bugs.webkit.org/show_bug.cgi?id=200772
     7   
     8    Introduced regressions related to loading of local files.
     9    (Requested by perarne on #webkit).
     10   
     11    Reverted changeset:
     12   
     13    "[Mac] Use the PID of the WebContent process when issuing
     14    local file read sandbox extensions"
     15    https://bugs.webkit.org/show_bug.cgi?id=200543
     16    https://trac.webkit.org/changeset/248440
     17   
     18    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     19
     20    2019-08-15  Commit Queue  <commit-queue@webkit.org>
     21
     22            Unreviewed, rolling out r248440.
     23            https://bugs.webkit.org/show_bug.cgi?id=200772
     24
     25            Introduced regressions related to loading of local files.
     26            (Requested by perarne on #webkit).
     27
     28            Reverted changeset:
     29
     30            "[Mac] Use the PID of the WebContent process when issuing
     31            local file read sandbox extensions"
     32            https://bugs.webkit.org/show_bug.cgi?id=200543
     33            https://trac.webkit.org/changeset/248440
     34
    1352019-08-13  Alan Coon  <alancoon@apple.com>
    236
  • branches/safari-608-branch/Source/WTF/wtf/Platform.h

    r248628 r248744  
    15271527#endif
    15281528
    1529 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
    1530 #define HAVE_SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID 1
    1531 #endif
    1532 
    15331529#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
    15341530#define HAVE_MDNS_FAST_REGISTRATION 1
  • branches/safari-608-branch/Source/WTF/wtf/spi/darwin/SandboxSPI.h

    r248628 r248744  
    6565char *sandbox_extension_issue_generic(const char *extension_class, uint32_t flags);
    6666char *sandbox_extension_issue_mach_to_process_by_pid(const char *extension_class, const char *name, uint32_t flags, pid_t);
    67 char *sandbox_extension_issue_file_to_process_by_pid(const char *extension_class, const char *path, uint32_t flags, pid_t);
    6867int sandbox_check(pid_t, const char *operation, enum sandbox_filter_type, ...);
    6968int sandbox_check_by_audit_token(audit_token_t, const char *operation, enum sandbox_filter_type, ...);
  • branches/safari-608-branch/Source/WebKit/ChangeLog

    r248742 r248744  
     12019-08-15  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r248731. rdar://problem/54360857
     4
     5    Unreviewed, rolling out r248440.
     6    https://bugs.webkit.org/show_bug.cgi?id=200772
     7   
     8    Introduced regressions related to loading of local files.
     9    (Requested by perarne on #webkit).
     10   
     11    Reverted changeset:
     12   
     13    "[Mac] Use the PID of the WebContent process when issuing
     14    local file read sandbox extensions"
     15    https://bugs.webkit.org/show_bug.cgi?id=200543
     16    https://trac.webkit.org/changeset/248440
     17   
     18    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     19
     20    2019-08-15  Commit Queue  <commit-queue@webkit.org>
     21
     22            Unreviewed, rolling out r248440.
     23            https://bugs.webkit.org/show_bug.cgi?id=200772
     24
     25            Introduced regressions related to loading of local files.
     26            (Requested by perarne on #webkit).
     27
     28            Reverted changeset:
     29
     30            "[Mac] Use the PID of the WebContent process when issuing
     31            local file read sandbox extensions"
     32            https://bugs.webkit.org/show_bug.cgi?id=200543
     33            https://trac.webkit.org/changeset/248440
     34
    1352019-08-15  Alan Coon  <alancoon@apple.com>
    236
  • branches/safari-608-branch/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm

    r248628 r248744  
    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))
  • branches/safari-608-branch/Source/WebKit/Shared/SandboxExtension.h

    r248628 r248744  
    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
  • branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.cpp

    r248628 r248744  
    10661066    ASSERT_WITH_SECURITY_IMPLICATION(!WebKit::isInspectorPage(*this));
    10671067
    1068 #if PLATFORM(MAC) && HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)
    1069     if (SandboxExtension::createHandleForReadByPid("/", processIdentifier(), sandboxExtensionHandle)) {
    1070 #else
    10711068    if (SandboxExtension::createHandle("/", SandboxExtension::Type::ReadOnly, sandboxExtensionHandle)) {
    1072 #endif
    10731069        willAcquireUniversalFileReadSandboxExtension(process);
    10741070        return;
     
    10831079    auto baseURL = URL(URL(), url.baseAsString());
    10841080    auto basePath = baseURL.fileSystemPath();
    1085     if (basePath.isNull())
    1086         return;
    1087 #if PLATFORM(MAC) && HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)
    1088     if (SandboxExtension::createHandleForReadByPid(basePath, processIdentifier(), sandboxExtensionHandle))
    1089 #else
    1090     if (SandboxExtension::createHandle(basePath, SandboxExtension::Type::ReadOnly, sandboxExtensionHandle))
    1091 #endif
     1081    if (!basePath.isNull() && SandboxExtension::createHandle(basePath, SandboxExtension::Type::ReadOnly, sandboxExtensionHandle))
    10921082        m_process->assumeReadAccessToBaseURL(*this, baseURL);
    10931083}
Note: See TracChangeset for help on using the changeset viewer.