Title: [295411] trunk/Source
Revision
295411
Author
timothy_hor...@apple.com
Date
2022-06-08 22:15:13 -0700 (Wed, 08 Jun 2022)

Log Message

Upstream some camera-related sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=241446

Reviewed by Wenson Hsieh.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:

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

Modified Paths

Diff

Modified: trunk/Source/WTF/wtf/PlatformHave.h (295410 => 295411)


--- trunk/Source/WTF/wtf/PlatformHave.h	2022-06-09 05:12:01 UTC (rev 295410)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2022-06-09 05:15:13 UTC (rev 295411)
@@ -1230,3 +1230,7 @@
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000)
 #define HAVE_SHARING_SERVICE_PICKER_POPOVER_SPI 1
 #endif
+
+#if PLATFORM(MAC)
+#define HAVE_ADDITIONAL_APPLE_CAMERA_SERVICE 1
+#endif

Modified: trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in (295410 => 295411)


--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2022-06-09 05:12:01 UTC (rev 295410)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2022-06-09 05:15:13 UTC (rev 295411)
@@ -2053,8 +2053,14 @@
 (with-filter (uid 0)
     (allow syscall-unix (syscall-number SYS_gettid))) ;; Needed for base system, see <rdar://problem/48651255>
 
-#if USE(APPLE_INTERNAL_SDK)
-#include <WebKitAdditions/WebContentSandboxAdditionsMac.sb>
+#if HAVE(ADDITIONAL_APPLE_CAMERA_SERVICE)
+(if (equal? (param "CPU") "arm64")
+    (with-filter (extension "com.apple.webkit.camera")
+        (allow mach-lookup
+            (require-all
+                (extension "com.apple.webkit.extension.mach")
+                (global-name "com.apple.appleh13camerad")
+            ))))
 #endif
 
 #if HAVE(SANDBOX_MESSAGE_FILTERING)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to