this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

libsystem_sandbox constants and NSExtensionContext

(#445)

+21 -22
-21
src/sandbox/CMakeLists.txt
··· 1 1 project(libsandbox) 2 2 3 - cmake_minimum_required(VERSION 2.4.0) 4 - 5 - if(COMMAND cmake_policy) 6 - cmake_policy(SET CMP0003 NEW) 7 - endif(COMMAND cmake_policy) 8 - 9 - add_definitions(-D__APPLE__ -D__MACH__) 10 - add_definitions(-DTARGET_OS_MAC=1) 11 - add_definitions(-D__APPLE__ -D__DYNAMIC__) 12 - add_definitions(-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1080) 13 - 14 - include_directories(${CMAKE_SOURCE_DIR}/src/kernel/libsyscall/wrappers) 15 - include_directories(${CMAKE_SOURCE_DIR}/src/libc/darwin) 16 - 17 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -D__DARWIN_UNIX03 -fPIC -w") 18 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 19 - 20 - SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/darling") 21 - SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 22 - SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 23 - 24 3 set(DYLIB_INSTALL_NAME "/usr/lib/system/libsystem_sandbox.dylib") 25 4 add_darling_library(sandbox SHARED sandbox.c) 26 5 target_link_libraries(sandbox PRIVATE system_c system_kernel system_dyld system_malloc)
+21 -1
src/sandbox/sandbox.c
··· 1 1 #include "sandbox.h" 2 2 #include <stddef.h> 3 3 #include <string.h> 4 - 4 + #include <stdlib.h> 5 5 #include <sys/types.h> 6 6 7 7 // DUMMY implementation ··· 22 22 const char kSBXProfileNoWriteExceptTemporary[] = "no_write_except_temporary"; 23 23 24 24 const char kSBXProfilePureComputation[] = "pure_computation"; 25 + 26 + const char APP_SANDBOX_IOKIT_CLIENT[] = "com.apple.app-sandbox.iokit-client"; 27 + const char APP_SANDBOX_MACH[] = "com.apple.app-sandbox.mach"; 28 + const char APP_SANDBOX_READ[] = "com.apple.app-sandbox.read"; 29 + const char APP_SANDBOX_READ_WRITE[] = "com.apple.app-sandbox.read-write"; 30 + const char IOS_SANDBOX_APPLICATION_GROUP[] = "com.apple.sandbox.application-group"; 31 + const char IOS_SANDBOX_CONTAINER[] = "com.apple.sandbox.container"; 32 + 33 + // Assuming these are 64-bit only because at least one has a value 34 + // that can't be stored in a 32-bit integer. 35 + #ifdef __LP64__ 36 + 37 + const uint64_t SANDBOX_EXTENSION_CANONICAL = 0x0000001000000002; 38 + const uint64_t SANDBOX_EXTENSION_DEFAULT = 0x0000000400000000; 39 + const uint64_t SANDBOX_EXTENSION_MAGIC = 0x0000000000000001; 40 + const uint64_t SANDBOX_EXTENSION_NO_REPORT = 0x0000000100000010; 41 + const uint64_t SANDBOX_EXTENSION_PREFIXMATCH = 0x0000000200000004; 42 + const uint64_t SANDBOX_EXTENSION_UNRESOLVED = 0x0000000100000001; 43 + 44 + #endif 25 45 26 46 void sandbox_free_error(char *errorbuf) 27 47 {