Retired Document
Important: Support for DirectoryService plug-ins has been deprecated and will be removed in a future release.
A new architecture was introduced in OS X v10.9 to allow the creation of native Open Directory modules. Unlike DirectoryService, opendirectoryd
uses modules implemented as a standalone process that uses XPC to communicate with opendirectoryd
. Implementing a module as an XPC service ensures a private address space and improves security and reliability, because modules cannot crash another module or opendirectoryd
.
Property List for an Open Directory Plug-in
An Open Directory plug-in is a standard OS X bundle and follows the guidelines defined for OS X packages.
Open Directory plug-ins are loaded from the following directories:
/System/Library/Frameworks/DirectoryService.framework/Resources/Plugins
(which may be read-only)/Library/DirectoryServices/PlugIns
(which is always writable)
or from other directories that may be defined later by OS X.
Open Directory loads Open Directory plug-ins using the CFBundle load mechanism.
No special linker commands are required to build an Open Directory plug-in, but you should use the -bundle_loader /usr/sbin/DirectoryService
option if you want to call APIs from the DirectoryService framework. Do no link to the DirectoryService framework, but use the DirectoryService framework to locate header files. The benefit of this approach is that calls can be directly dispatched without the overhead of a Mach message.
You must provide a property list file for your Open Directory plug-in. Here is the property list file for a plug-in named SamplePlugin
:
Listing 10-1 Property list for a sample plug-in
{ |
"CFBundleExecutable" = "SamplePlugin"; |
"CFBundleName" = "DirectoryServiceSamplePlugIn"; |
"CFBundleIdentifier" = "com.apple.DirectoryService.SamplePlugin"; |
"CFBundleVersion" = "1.0"; |
"CFBundleShortVersionString" = "1.0"; |
"CFBundlePackageType" = "dspi"; |
"CFBundlePackageSignature" = "adss"; |
"CFPlugInDynamicRegistration" = "NO"; |
"CFPlugInFactories" = { |
"D970D52E-D515-11D3-9FF9-000502C1C736" = "ModuleFactory"; |
}; |
"CFPlugInTypes" = {"697B5D6C-87A1-1226-89CA-000502C1C736" = |
("D970D52E-D515-11D3-9FF9-000502C1C736"); |
}; |
"DSServerSignature" = "Samp"; |
} |
In Listing 10-1, you are responsible for setting the following values:
CFBundleExecutable
— the name of the Open Directory plug-in
CFBundleName
— the name of the bundle
CFBundleIdentifier
— the bundle identifier
CFBundleVersion
— the bundle’s version number
CFBundleShortVersionString
— the bundle’s short version number
CFPluginFactories
— a UNIX unique identifier (UUID) that is unique among all plug-ins generated by theuuidgen
utilityCFPlugInTypes
— the first value must be697B5D6C-87A1-1226-89CA-000502C1C736;
the second value must be your plug-in’s UUIDDSServerSignature
— your server signature
The following values must be set as shown in Listing 10-1:
CFBundlePackageType
— must bedspi
CFBundlePackageSignature
— must beadss
CFPlugInDynamicRegistration
— must beNO
CFPlugInTypes
(first value) — must be697B5D6C-87A1-1226-89CA-00502C1C736
See the section Local Configuration for information about the CFBundleConfigAvail
property, which is used to specify a configuration application for your Open Directory plug-in OS X v10.1.
Copyright © 2015 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2015-03-09