[webkit-changes] [WebKit/WebKit] 0646de: Query LaunchServices to determine the host app bun...

Commit Queue noreply at github.com
Wed Apr 12 19:10:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0646de88e5b9e9e657741c81b75e51e353ff35ae
      https://github.com/WebKit/WebKit/commit/0646de88e5b9e9e657741c81b75e51e353ff35ae
  Author: Luming Yin <luming_yin at apple.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    M Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h
    M Source/WebKit/Configurations/WebKit.xcconfig
    M Source/WebKit/Scripts/process-entitlements.sh
    M Source/WebKit/webpushd/PushClientConnection.h
    M Source/WebKit/webpushd/PushClientConnection.mm

  Log Message:
  -----------
  Query LaunchServices to determine the host app bundle identifier
https://bugs.webkit.org/show_bug.cgi?id=255361
rdar://107931346

Reviewed by Brady Eidson.

For WebPush on macOS, use LaunchServices instead of the codesigning identifier to determine
the host app identity. If no matching result is found by querying LaunchServices, fallback
to checking the code signing identifier as before.

* Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h:
Forward declare LaunchServices SPI.

* Source/WebKit/Configurations/WebKit.xcconfig:
Weak link libbsm so we can extract the audit session ID from the audit token.

* Source/WebKit/Scripts/process-entitlements.sh:
Add the necessary entitlement so we can query LaunchServices with an asn reference.

* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::ClientConnection::hostAppCodeSigningIdentifier):
Call bundleIdentifierFromAuditToken to determine the host bundle identifier on Mac.

(WebPushD::ClientConnection::bundleIdentifierFromAuditToken):
On macOS, prefer using LaunchServices to determine the host app identity, with the code signing
identifier as fallback.

Canonical link: https://commits.webkit.org/262898@main




More information about the webkit-changes mailing list