]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_translocate/lib/SecTranslocate.h
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_translocate / lib / SecTranslocate.h
index c01e4127d6646af1d73697078506c9d497455d18..ce31fb1f1b45e62eb232476aa5034b972ba6fd35 100644 (file)
@@ -98,6 +98,33 @@ __OSX_AVAILABLE(10.12);
 CFURLRef __nullable SecTranslocateCreateSecureDirectoryForURL (CFURLRef pathToTranslocate, CFURLRef __nullable destinationPath, CFErrorRef* __nullable error)
 __OSX_AVAILABLE(10.12);
 
+/*!
+    @function SecTranslocateCreateGeneric
+    @abstract Create a CFURL pointing to a translocated location from which to access the directory specified by pathToTranslocate.
+
+    @param pathToTranslocate URL of the directory to be accessed from a translocated location.
+    @param destinationPath URL where the directory of interest should be translocated
+    @param error On error will be populated with an error object describing the failure (a posix domain error such as EINVAL)
+
+    @result A CFURL pointing to the translocated location of the directory.
+
+    @discussion
+        Calls to this function, and the others dealng with creation / deletion of mounts are serialized to ensure only one call to either
+        is operating at a time.
+        Translocations will be created in specified destinationPath
+        pathToTranslocated is expected to be a folder
+        
+        If pathToTranslocate is in a quarantined mountpoint, the quarantine attributes will be propagated to the
+            translocated location.
+        pathToTranslocate will cause a failure if it doesn't resolve to a path that exists, or it exceeds MAXPATHLEN
+        This function can be run from any process. If the process is not the xpc server, then an xpc call is made.
+ */
+CFURLRef __nullable SecTranslocateCreateGeneric (CFURLRef pathToTranslocate, CFURLRef destinationPath, CFErrorRef* __nullable error)
+__OSX_AVAILABLE(10.16);
+
 /*!
     @function SecTranslocateAppLaunchCheckin