this repo has no description
1
fork

Configure Feed

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

Merge remote-tracking branch 'origin/master' into using-machos-experiment

+7482 -64
+6
.gitmodules
··· 196 196 [submodule "src/external/IONetworkingFamily"] 197 197 path = src/external/IONetworkingFamily 198 198 url = ../darling-IONetworkingFamily.git 199 + [submodule "src/external/tcsh"] 200 + path = src/external/tcsh 201 + url = ../darling-tcsh.git 202 + [submodule "src/external/system_cmds"] 203 + path = src/external/system_cmds 204 + url = ../darling-system_cmds.git
+3
platform-include/mach/exception_types.h
··· 100 100 101 101 #define EXC_GUARD 12 /* Violated guarded resource protections */ 102 102 103 + #define EXC_CORPSE_NOTIFY 13 /* Abnormal process exited to corpse state */ 104 + 103 105 104 106 /* 105 107 * Machine-independent exception behaviors ··· 139 141 #define EXC_MASK_CRASH (1 << EXC_CRASH) 140 142 #define EXC_MASK_RESOURCE (1 << EXC_RESOURCE) 141 143 #define EXC_MASK_GUARD (1 << EXC_GUARD) 144 + #define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY) 142 145 143 146 #define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \ 144 147 EXC_MASK_BAD_INSTRUCTION | \
+79
platform-include/sysdir.h
··· 1 + /* 2 + * Copyright (c) 1999-2015 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #ifndef __SYSTEM_DIRECTORIES_H__ 25 + #define __SYSTEM_DIRECTORIES_H__ 26 + 27 + #include <os/base.h> 28 + #include <Availability.h> 29 + 30 + // Available OSX 10.12, iOS 10.0, WatchOS 3.0 and TVOS 10.0. Not all enum identifiers return a useful path on all platforms. 31 + OS_ENUM(sysdir_search_path_directory, unsigned int, 32 + SYSDIR_DIRECTORY_APPLICATION = 1, // supported applications (Applications) 33 + SYSDIR_DIRECTORY_DEMO_APPLICATION = 2, // unsupported applications, demonstration versions (Applications/Demos) 34 + SYSDIR_DIRECTORY_DEVELOPER_APPLICATION = 3, // developer applications (Developer/Applications) Soft deprecated as of __MAC_10_5 - there is no one single Developer directory 35 + SYSDIR_DIRECTORY_ADMIN_APPLICATION = 4, // system and network administration applications (Applications/Utilities) 36 + SYSDIR_DIRECTORY_LIBRARY = 5, // various user-visible documentation, support, and configuration files, resources (Library) 37 + SYSDIR_DIRECTORY_DEVELOPER = 6, // developer resources (Developer) Soft deprecated as of __MAC_10_5 - there is no one single Developer directory 38 + SYSDIR_DIRECTORY_USER = 7, // user home directories (Users) 39 + SYSDIR_DIRECTORY_DOCUMENTATION = 8, // documentation (Library/Documentation) 40 + SYSDIR_DIRECTORY_DOCUMENT = 9, // documents (Documents) 41 + SYSDIR_DIRECTORY_CORESERVICE = 10, // location of core services (Library/CoreServices) 42 + SYSDIR_DIRECTORY_AUTOSAVED_INFORMATION = 11, // location of user's directory for use with autosaving (Library/Autosave Information) 43 + SYSDIR_DIRECTORY_DESKTOP = 12, // location of user's Desktop (Desktop) 44 + SYSDIR_DIRECTORY_CACHES = 13, // location of discardable cache files (Library/Caches) 45 + SYSDIR_DIRECTORY_APPLICATION_SUPPORT = 14, // location of application support files (plug-ins, etc) (Library/Application Support) 46 + SYSDIR_DIRECTORY_DOWNLOADS = 15, // location of user's Downloads directory (Downloads) 47 + SYSDIR_DIRECTORY_INPUT_METHODS = 16, // input methods (Library/Input Methods) 48 + SYSDIR_DIRECTORY_MOVIES = 17, // location of user's Movies directory (Movies) 49 + SYSDIR_DIRECTORY_MUSIC = 18, // location of user's Music directory (Music) 50 + SYSDIR_DIRECTORY_PICTURES = 19, // location of user's Pictures directory (Pictures) 51 + SYSDIR_DIRECTORY_PRINTER_DESCRIPTION = 20, // location of system's PPDs directory (Library/Printers/PPDs) 52 + SYSDIR_DIRECTORY_SHARED_PUBLIC = 21, // location of user's Public sharing directory (Public) 53 + SYSDIR_DIRECTORY_PREFERENCE_PANES = 22, // location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes) 54 + SYSDIR_DIRECTORY_ALL_APPLICATIONS = 100, // all directories where applications can occur (Applications, Applications/Utilities, Developer/Applications, ...) 55 + SYSDIR_DIRECTORY_ALL_LIBRARIES = 101, // all directories where resources can occur (Library, Developer) 56 + ); 57 + 58 + // Available OSX 10.12, iOS 10.0, WatchOS 3.0 and TVOS 10.0. Not all enum identifiers are useful on all platforms. 59 + OS_ENUM(sysdir_search_path_domain_mask, unsigned int, 60 + SYSDIR_DOMAIN_MASK_USER = ( 1UL << 0 ), // user's home directory --- place to install user's personal items (~) 61 + SYSDIR_DOMAIN_MASK_LOCAL = ( 1UL << 1 ), // local to the current machine --- place to install items available to everyone on this machine 62 + SYSDIR_DOMAIN_MASK_NETWORK = ( 1UL << 2 ), // publically available location in the local area network --- place to install items available on the network (/Network) 63 + SYSDIR_DOMAIN_MASK_SYSTEM = ( 1UL << 3 ), // provided by Apple 64 + SYSDIR_DOMAIN_MASK_ALL = 0x0ffff, // all domains: all of the above and more, future items 65 + ); 66 + 67 + typedef unsigned int sysdir_search_path_enumeration_state; 68 + 69 + __BEGIN_DECLS 70 + 71 + extern sysdir_search_path_enumeration_state 72 + sysdir_start_search_path_enumeration(sysdir_search_path_directory_t dir, sysdir_search_path_domain_mask_t domainMask) __API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); 73 + 74 + extern sysdir_search_path_enumeration_state 75 + sysdir_get_next_search_path_enumeration(sysdir_search_path_enumeration_state state, char *path) __API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); 76 + 77 + __END_DECLS 78 + 79 + #endif /* defined(__SYSTEM_DIRECTORIES_H__) */
+1
src/CMakeLists.txt
··· 151 151 add_subdirectory(external/text_cmds) 152 152 add_subdirectory(external/adv_cmds) 153 153 #add_subdirectory(external/network_cmds) 154 + add_subdirectory(external/system_cmds) 154 155 add_subdirectory(external/bash) 155 156 add_subdirectory(external/less) 156 157 add_subdirectory(external/grep)
+1
src/OpenDirectory/CFOpenDirectory/CFOpenDirectory
··· 1 + Headers
+42
src/OpenDirectory/CFOpenDirectory/Headers/CFODContext.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__OPENDIRECTORY_CFODCONTEXT__) 25 + #define __OPENDIRECTORY_CFODCONTEXT__ 1 26 + 27 + #include <CFOpenDirectory/CFOpenDirectory.h> 28 + 29 + __BEGIN_DECLS 30 + 31 + /*! 32 + @function ODContextGetTypeID 33 + @abstract Standard GetTypeID function support for CF-based objects 34 + @discussion Returns the typeID for the ODContext object 35 + @result a valid CFTypeID for the ODContext object 36 + */ 37 + CF_EXPORT 38 + CFTypeID ODContextGetTypeID(void); 39 + 40 + __END_DECLS 41 + 42 + #endif /* ! __OPENDIRECTORY_CFODCONTEXT__ */
+442
src/OpenDirectory/CFOpenDirectory/Headers/CFODNode.h
··· 1 + /* 2 + * Copyright (c) 2009-2012 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__OPENDIRECTORY_CFODNODE__) 25 + #define __OPENDIRECTORY_CFODNODE__ 1 26 + 27 + #include <CFOpenDirectory/CFOpenDirectory.h> 28 + 29 + __BEGIN_DECLS 30 + 31 + /*! 32 + @function ODNodeGetTypeID 33 + @abstract Standard GetTypeID function support for CF-based objects 34 + @discussion Returns the typeID for the ODNode objects 35 + @result a valid CFTypeID for the ODNode object 36 + */ 37 + CF_EXPORT 38 + CFTypeID ODNodeGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 39 + 40 + /*! 41 + @function ODNodeCreateWithNodeType 42 + @abstract Creates an ODNodeRef based on a specific node type 43 + @discussion Creates an ODNodeRef based on a specific node type 44 + @param allocator a memory allocator to use for this object 45 + @param session an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed 46 + @param nodeType an ODNodeType of the node to open 47 + @param error an optional CFErrorRef reference for error details 48 + @result a valid ODNodeRef if successful, otherwise returns NULL. outError can be checked for details upon 49 + failure. 50 + */ 51 + CF_EXPORT 52 + ODNodeRef ODNodeCreateWithNodeType(CFAllocatorRef allocator, ODSessionRef session, ODNodeType nodeType, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 53 + 54 + /*! 55 + @function ODNodeCreateWithName 56 + @abstract Creates an ODNodeRef based on a partciular node name 57 + @discussion Creates an ODNodeRef based on a particular node name 58 + @param allocator a memory allocator to use for this object 59 + @param session an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed 60 + @param nodeName a CFStringRef of the name of the node to open 61 + @param error an optional CFErrorRef reference for error details 62 + @result a valid ODNodeRef if successful, otherwise returns NULL. outError can be checked for specific 63 + error 64 + */ 65 + CF_EXPORT 66 + ODNodeRef ODNodeCreateWithName(CFAllocatorRef allocator, ODSessionRef session, CFStringRef nodeName, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 67 + 68 + /*! 69 + @function ODNodeCreateCopy 70 + @abstract Creates a copy, including any remote credentials used for Proxy and/or Node authentication 71 + @discussion Creates a copy of the object including all credentials used for the original. Can be used for future 72 + references to the same node setup. 73 + @param allocator a memory allocator to use for this object 74 + @param node an ODNodeRef to make a copy of 75 + @param error an optional CFErrorRef reference for error details 76 + @result a valid ODNodeRef if successful, otherwise returns NULL, with outError set to a CFErrorRef 77 + */ 78 + CF_EXPORT 79 + ODNodeRef ODNodeCreateCopy(CFAllocatorRef allocator, ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 80 + 81 + /*! 82 + @function ODNodeCopySubnodeNames 83 + @abstract Returns a CFArray of subnode names for this node, which may contain sub-nodes or search policy nodes 84 + @discussion Returns a CFArray of subnode names for this node, which may contain sub-nodes or search policy nodes. 85 + Commonly used with Search policy nodes. 86 + @param node an ODNodeRef to use 87 + @param error an optional CFErrorRef reference for error details 88 + @result a CFArrayRef with the list of nodes, otherwise NULL, with outError set to a CFErrorRef 89 + */ 90 + CF_EXPORT 91 + CFArrayRef ODNodeCopySubnodeNames(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 92 + 93 + /*! 94 + @function ODNodeCopyUnreachableSubnodeNames 95 + @abstract Will return names of subnodes that are not currently reachable. 96 + @discussion Will return names of subnodes that are not currently reachable. Commonly used with Search policy nodes 97 + to determine if any nodes are currently unreachable, but may also return other subnodes if the 98 + Open Directory plugin supports. 99 + @param node an ODNodeRef to use 100 + @param error an optional CFErrorRef reference for error details 101 + @result a CFArrayRef with the list of unreachable nodes or NULL if no bad nodes 102 + */ 103 + CF_EXPORT 104 + CFArrayRef ODNodeCopyUnreachableSubnodeNames(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 105 + 106 + /*! 107 + @function ODNodeGetName 108 + @abstract Returns the node name of the node that was opened 109 + @discussion Returns the node name of the node that was opened 110 + @param node an ODNodeRef to use 111 + @result a CFStringRef of the node name that is current or NULL if no open node 112 + */ 113 + CF_EXPORT 114 + CFStringRef ODNodeGetName(ODNodeRef node) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 115 + 116 + /*! 117 + @function ODNodeCopyDetails 118 + @abstract Returns a dictionary with details about the node in dictionary form 119 + @discussion Returns a dictionary with details about the node in dictionary form. 120 + @param node an ODNodeRef to use 121 + @param keys a CFArrayRef listing the keys the user wants returned, such as 122 + kODAttributeTypeStreet 123 + @param error an optional CFErrorRef reference for error details 124 + @result a CFDictionaryRef containing the requested key and values in form of a CFArray 125 + */ 126 + CF_EXPORT 127 + CFDictionaryRef ODNodeCopyDetails(ODNodeRef node, CFArrayRef keys, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 128 + 129 + /*! 130 + @function ODNodeCopySupportedRecordTypes 131 + @abstract Returns a CFArrayRef of the record types supported by this node. 132 + @discussion Returns a CFArrayRef of the record types supported by this node. If node does not support the check 133 + then all possible types will be returned. 134 + @param node an ODNodeRef to use 135 + @param error an optional CFErrorRef reference for error details 136 + @result a valid CFArrayRef of CFStrings listing the supported Record types on this node. 137 + */ 138 + CF_EXPORT 139 + CFArrayRef ODNodeCopySupportedRecordTypes(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 140 + 141 + /*! 142 + @function ODNodeCopySupportedAttributes 143 + @abstract Will return a list of attribute types supported for that attribute if possible 144 + @discussion Will return a list of attribute types supported for that attribute if possible. If no specific 145 + types are available, then all possible values will be returned instead. 146 + @param node an ODNodeRef to use 147 + @param recordType a ODRecordTypeRef with the type of record to check attribute types. If NULL is passed it will 148 + return all possible attributes that are available. 149 + @param error an optional CFErrorRef reference for error details 150 + @result a valid CFArrayRef of CFStrings listing the attributes supported for the requested record type 151 + */ 152 + CF_EXPORT 153 + CFArrayRef ODNodeCopySupportedAttributes(ODNodeRef node, ODRecordType recordType, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 154 + 155 + /*! 156 + @function ODNodeSetCredentials 157 + @abstract Sets the credentials for interaction with the ODNode 158 + @discussion Sets the credentials for interaction with the ODNode. Record references, etc. will use these credentials 159 + to query or change data. Setting the credentials on a node referenced by other OD object types will 160 + change the credentials for all for all references. 161 + @param node an ODNodeRef to use 162 + @param recordType a ODRecordTypeRef of the Record Type to use, if NULL is passed, defaults to a 163 + kODRecordTypeUsers 164 + @param recordName a CFString of the username to be used for this node authentication 165 + @param password a CFString of the password to be used for this node authentication 166 + @param error an optional CFErrorRef reference for error details 167 + @result returns true on success, otherwise outError can be checked for details. If the authentication failed, 168 + the previous credentials are used. 169 + */ 170 + CF_EXPORT 171 + bool ODNodeSetCredentials(ODNodeRef node, ODRecordType recordType, CFStringRef recordName, CFStringRef password, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 172 + 173 + /*! 174 + @function ODNodeSetCredentialsExtended 175 + @abstract Allows use of other Open Directory types of authentications to set the credentials for an ODNode 176 + @discussion Allows the caller to use other types of authentications that are available in Open Directory, that may 177 + require response-request loops, etc. Not all OD plugins will support this call, look for 178 + kODErrorCredentialsMethodNotSupported in outError. 179 + @param node an ODNodeRef to use 180 + @param recordType a ODRecordType of the type of record to do the authentication with 181 + @param authType a ODAuthenticationType of the type of authentication to be used (e.g., kDSStdAuthNTLMv2) 182 + @param authItems a CFArray of CFData or CFString items that will be sent in order to the auth process 183 + @param outAuthItems will be assigned to a pointer of a CFArray of CFData items if there are returned values 184 + @param outContext will return a pointer to a context if caller supplies a container, and the call requires a 185 + context. If a non-NULL value is returned, then more calls must be made with the Context to continue 186 + the authorization. 187 + @param error an optional CFErrorRef reference for error details 188 + @result a bool will be returned with the result of the operation and outAuthItems set with response items 189 + and outContext set for any needed continuation. 190 + */ 191 + CF_EXPORT 192 + bool ODNodeSetCredentialsExtended(ODNodeRef node, ODRecordType recordType, ODAuthenticationType authType, CFArrayRef authItems, CFArrayRef *outAuthItems, ODContextRef *outContext, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 193 + 194 + /*! 195 + @function ODNodeSetCredentialsUsingKerberosCache 196 + @abstract Unsupported function. 197 + @discussion Unsupported function. 198 + */ 199 + CF_EXPORT 200 + bool ODNodeSetCredentialsUsingKerberosCache(ODNodeRef node, CFStringRef cacheName, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_NA, __IPHONE_NA); 201 + 202 + /*! 203 + @function ODNodeCreateRecord 204 + @abstract Takes a record and all of the provided attributes and creates the record in the node 205 + @discussion Takes all the provided attributes and type to create an entire record. The function will assign a 206 + UUID to the record automatically. This UUID can be overwritten by the client by passing with the 207 + other attributes. 208 + @param node an ODNodeRef to use 209 + @param recordType a ODRecordTypeRef of the type of record (e.g., kODRecordTypeUsers, etc.) 210 + @param recordName a CFStringRef of the name of record 211 + @param attributeDict a CFDictionaryRef of key-value pairs for attribute values. The key is a CFStringRef of the 212 + attribute name or ODRecordType constant such as kODAttributeTypeRecordName. The value must be a CFArrayRef of 213 + CFDataRef or CFStringRef. If additional kODAttributeTypeRecordName are to be set, they can be passed in the 214 + inAttributes list. This parameter is optional and can be NULL. If any of the attributes passed 215 + fail to be set, the record will be deleted and outError will be set with the appropriate error. 216 + If a password is not supplied with a user account, then a random password will be set automatically. If 217 + an empty password is expected, then the kODAttributeTypePassword should be set to an empty CFArray. 218 + @param error an optional CFErrorRef reference for error details 219 + @result returns a valid ODRecordRef. If the add fails, outError can be checked for details. 220 + */ 221 + CF_EXPORT 222 + ODRecordRef ODNodeCreateRecord(ODNodeRef node, ODRecordType recordType, CFStringRef recordName, CFDictionaryRef attributeDict, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 223 + 224 + /*! 225 + @function ODNodeCopyRecord 226 + @abstract Simple API to open / create a references to a particular record on a Node 227 + @discussion Simple API to open / create a references to a particular record on a Node 228 + @param node an ODNodeRef to use 229 + @param recordType a ODRecordTypeRef of the record type to copy 230 + @param recordName a CFStringRef of the record name to copy 231 + @param attributes (optional) a CFArrayRef (or single ODAttributeType) of the attributes to copy from the directory. Can be NULL when no 232 + attributes are needed. Any standard types can be passed, for example 233 + kODAttributeTypeAllAttributes will fetch all attributes up front. If just standard attributes are needed, then 234 + kODAttributeTypeStandardOnly can be passed. 235 + @param error an optional CFErrorRef reference for error details 236 + @result returns a valid ODRecordRef. If the record copy fails, the error can be checked for details. 237 + If the record is not found, will return NULL with a NULL error. 238 + */ 239 + CF_EXPORT 240 + ODRecordRef ODNodeCopyRecord(ODNodeRef node, ODRecordType recordType, CFStringRef recordName, CFTypeRef attributes, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 241 + 242 + /*! 243 + @function ODNodeCustomCall 244 + @abstract Sends a custom call to a node. 245 + @discussion This will send a custom call to a node along with the specified data, returning the result. 246 + @param node an ODNodeRef to use 247 + @param customCode the custom code to be sent to the node 248 + @param data a data blob expected by the custom code, can be NULL of no send data 249 + @param error an optional CFErrorRef reference for error details 250 + @result a CFDataRef with the result of the operation, otherwise outError can be checked for specific details 251 + */ 252 + CF_EXPORT CF_RETURNS_RETAINED 253 + CFDataRef ODNodeCustomCall(ODNodeRef node, CFIndex customCode, CFDataRef data, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 254 + 255 + /*! 256 + * @function ODNodeCustomCall 257 + * 258 + * @abstract 259 + * Sends a named custom function call to a node. 260 + * 261 + * @discussion 262 + * Sends a named custom function call to a node. Custom functions are defined by the modules that implement them 263 + * and the parameter is defined by the module. 264 + * 265 + * @param node 266 + * An ODNodeRef to use 267 + * 268 + * @param function 269 + * A CFStringRef that specifies the name of the function 270 + * 271 + * @param payload 272 + * A CFType appropriate for the custom function. The type is dictated by the module implementing the function. 273 + * 274 + * @param error 275 + * An optional CFErrorRef reference to receive any errors from the custom function call. 276 + * 277 + * @result 278 + * Returns a CFType appropriate for the function. 279 + */ 280 + CF_EXPORT CF_RETURNS_RETAINED 281 + CFTypeRef 282 + ODNodeCustomFunction(ODNodeRef node, CFStringRef function, CFTypeRef payload, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 283 + 284 + /*! 285 + @function ODNodeCopyPolicies 286 + @abstract This will copy any policies configured for the node. 287 + @discussion This will copy any policies configured for the node. 288 + @param node an ODNodeRef to use 289 + @param error an optional CFErrorRef reference for error details 290 + @result a CFDictionaryRef containing all currently set policies 291 + */ 292 + CF_EXPORT 293 + CFDictionaryRef ODNodeCopyPolicies(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeCopyAccountPolicies"); 294 + 295 + /*! 296 + @function ODNodeCopySupportedPolicies 297 + @abstract This will return a dictionary of supported policies. 298 + @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed 299 + for the policy in question. For example, if password history is available, it will state how much history is 300 + supported. 301 + @param node an ODNodeRef to use 302 + @param error an optional CFErrorRef reference for error details 303 + @result a CFDictionaryRef containing all currently supported policies. The values will be the maximum value allowed. 304 + */ 305 + CF_EXPORT 306 + CFDictionaryRef ODNodeCopySupportedPolicies(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA); 307 + 308 + /*! 309 + @function ODNodeSetPolicies 310 + @abstract This will set the policy for the node. 311 + @discussion This will set the policy for the node. Policies are evaluated in combination with record-level policies. 312 + @param node an ODNodeRef to use 313 + @param policies a CFDictionary of policies to be set 314 + @param error an optional CFErrorRef reference for error details 315 + @result a bool which signifies if the policy set succeeded, otherwise error is set. 316 + */ 317 + CF_EXPORT 318 + bool ODNodeSetPolicies(ODNodeRef node, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeSetAccountPolicies"); 319 + 320 + /*! 321 + @function ODNodeSetPolicy 322 + @abstract This will set a specific policy setting for the node. 323 + @discussion This will set a specific policy setting for the node. 324 + @param node an ODNodeRef to use 325 + @param policy a valid ODPolicyType 326 + @param value a CFTypeRef to be set (should be of appropriate type for the policy) 327 + @param error an optional CFErrorRef reference for error details 328 + @result a bool which signifies if the policy set succeeded, otherwise error is set. 329 + */ 330 + CF_EXPORT 331 + bool ODNodeSetPolicy(ODNodeRef node, ODPolicyType policyType, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeAddAccountPolicy"); 332 + 333 + /*! 334 + @function ODNodeRemovePolicy 335 + @abstract This will remove a specific policy setting from the node. 336 + @discussion This will remove a specific policy setting from the node. 337 + @param node an ODNodeRef to use 338 + @param policy a valid ODPolicyType 339 + @param error an optional CFErrorRef reference for error details 340 + @result a bool which signifies if the policy removal succeeded, otherwise error is set. 341 + */ 342 + CF_EXPORT 343 + bool ODNodeRemovePolicy(ODNodeRef node, ODPolicyType policyType, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeRemoveAccountPolicy"); 344 + 345 + /*! 346 + @function ODNodeAddAccountPolicy 347 + @abstract This will add an account policy to the node for the specified category. 348 + @discussion This will add an account policy to the node for the specified category. 349 + The specified policy will be applied to all users in the 350 + specified node when policies are evaluated. 351 + @param node an ODNodeRef to use. 352 + @param policy a dictionary containing the specific policy to be added. 353 + The dictionary may contain the following keys: 354 + kODPolicyKeyIdentifier a required key identifying the policy. 355 + kODPolicyKeyParameters an optional key containing a dictionary of 356 + parameters that can be used for informational purposes or in 357 + the policy format string. 358 + kODPolicyKeyContent a required key specifying the policy, 359 + from which a predicate will be created for evaluating 360 + the policy. 361 + @param category a valid ODPolicyCategoryType to which the specified policy will be added. 362 + @param error an optional CFErrorRef reference for error details. 363 + @result a bool which signifies if the policy addition succeeded, otherwise error is set. 364 + */ 365 + CF_EXPORT 366 + bool ODNodeAddAccountPolicy(ODNodeRef node, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 367 + 368 + /*! 369 + @function ODNodeRemoveAccountPolicy 370 + @abstract This will remove an account policy from the node for the specified category. 371 + @discussion This will remove an account policy from the node for the specified category. 372 + @param node an ODNodeRef to use. 373 + @param policy a dictionary containing the specific policy to be 374 + removed, with the same format as described in ODNodeAddAccountPolicy. 375 + @param category a valid ODPolicyCategoryType from which the specified policy will be removed. 376 + @param error an optional CFErrorRef reference for error details. 377 + @result a bool which signifies if the policy removal succeeded, otherwise error is set. 378 + */ 379 + CF_EXPORT 380 + bool ODNodeRemoveAccountPolicy(ODNodeRef node, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 381 + 382 + /*! 383 + @function ODNodeSetAccountPolicies 384 + @abstract This will set the policies for the node. 385 + @discussion This will set the policies for the node, replacing any existing 386 + policies. 387 + @param node an ODNodeRef to use. 388 + @param policies a dictionary containing all of the policies to be set 389 + for the node. The dictionary may contain the following keys: 390 + kODPolicyCategoryAuthentication an optional key with a value 391 + of an array of policy dictionaries that specify when 392 + authentications should be allowed. 393 + kODPolicyCategoryPasswordContent an optional key with a 394 + value of an array of policy dictionaries the specify the 395 + required content of passwords. 396 + kODPolicyCategoryPasswordChange an optional key with a value 397 + of an array of policy dictionaries that specify when 398 + passwords are required to be changed. 399 + @param error an optional CFErrorRef reference for error details. 400 + @result a bool which signifies if the policy set succeeded, otherwise error is set. 401 + */ 402 + CF_EXPORT 403 + bool ODNodeSetAccountPolicies(ODNodeRef node, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 404 + 405 + /*! 406 + @function ODNodeCopyAccountPolicies 407 + @abstract This will copy any policies configured for the node. 408 + @discussion This will copy any policies configured for the node. 409 + @param node an ODNodeRef to use. 410 + @param error an optional CFErrorRef reference for error details. 411 + @result a CFDictionaryRef containing all currently set policies. The 412 + format of the dictionary is the same as described in 413 + ODNodeSetAccountPolicies(). 414 + */ 415 + CF_EXPORT CF_RETURNS_RETAINED 416 + CFDictionaryRef ODNodeCopyAccountPolicies(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 417 + 418 + /*! 419 + @function ODNodePasswordContentCheck 420 + @abstract Validates a password against the node's password content policies. 421 + @discussion Validates a password against the node's password content policies. 422 + The node's password content policies will be evaluated to 423 + determine if the password is acceptable. May be used prior to 424 + creating the record. 425 + 426 + This check is only definitive at the time it was requested. The 427 + policy or the environment could change before the password change 428 + is actually requested. Errors from the password change request 429 + should be consulted. 430 + 431 + @param node an ODNodeRef to use. 432 + @param password the password to be evaluated against the content policies. 433 + @param recordName the name of the record. 434 + @param error an optional CFErrorRef reference for error details. 435 + @result a bool which signifies if the password passes all content policies, otherwise error is set. 436 + */ 437 + CF_EXPORT 438 + bool ODNodePasswordContentCheck(ODNodeRef node, CFStringRef password, CFStringRef recordName, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 439 + 440 + __END_DECLS 441 + 442 + #endif /* ! __OPENDIRECTORY_CFODNODE__ */
+180
src/OpenDirectory/CFOpenDirectory/Headers/CFODQuery.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__OPENDIRECTORY_CFODQUERY__) 25 + #define __OPENDIRECTORY_CFODQUERY__ 1 26 + 27 + #include <CFOpenDirectory/CFOpenDirectory.h> 28 + 29 + /*! 30 + @header CFODQuery 31 + @abstract ODQuery functions 32 + @discussion This header describes functions for working with ODQueryRefs. 33 + */ 34 + 35 + /*! 36 + @typedef ODQueryCallback 37 + @abstract Is called as results are returned from a query. The incoming result must be retained or copied. 38 + @discussion Is called as results are returned from an CFRunLoop-based query. These results are only partial 39 + and the callback is called repeatedly as results are available. The incoming result must be retained or copied. The 40 + array will be released by the CFRunLoop upon return. Incoming results do not include previous results, 41 + only the most recent results are returned. inResults can be NULL if an error occurs or the query is complete. If 42 + inError and inResults are NULL then the query has completed. 43 + */ 44 + typedef void (*ODQueryCallback)(ODQueryRef query, CFArrayRef results, CFErrorRef error, void *context); 45 + 46 + __BEGIN_DECLS 47 + 48 + /*! 49 + @function ODQueryGetTypeID 50 + @abstract Standard GetTypeID function support for CF-based objects 51 + @discussion Returns the typeID for the ODQuery object 52 + @result a valid CFTypeID for the ODQuery object 53 + */ 54 + CF_EXPORT 55 + CFTypeID ODQueryGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 56 + 57 + /*! 58 + @function ODQueryCreateWithNode 59 + @abstract Creates a query with the node using the parameters provided 60 + @discussion Creates a query with the node using the supplied query parameters. Some parameters can either be CFString or 61 + CFData or a CFArray of either CFString or CFData. 62 + @param allocator a memory allocator to use for this object 63 + @param node an ODNodeRef to use 64 + @param recordTypeOrList a CFString of a type or CFArray with a list of record types 65 + @param attribute a CFStringRef of the attribute name to query 66 + @param matchType an ODMatchType value that signifies the type of query 67 + @param queryValueOrList a CFStringRef, CFDataRef or CFArrayRef of either type for values to query in attribute 68 + @param returnAttributeOrList a CFStringRef or CFArrayRef of CFStrings with the list of attributes to be returned 69 + from the query. Passing NULL is equivalent to passing kODAttributeTypeStandardOnly. 70 + @param maxResults a CFIndex of the total number of values the caller wants to be returned 71 + @param error an optional CFErrorRef reference for error details 72 + @result an ODQueryRef which should be passed into ODQueryCopyResults for immediate results or 73 + ODQueryScheduleWithRunLoop for background behavior 74 + */ 75 + CF_EXPORT 76 + ODQueryRef ODQueryCreateWithNode(CFAllocatorRef allocator, ODNodeRef node, CFTypeRef recordTypeOrList, ODAttributeType attribute, ODMatchType matchType, CFTypeRef queryValueOrList, CFTypeRef returnAttributeOrList, CFIndex maxResults, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 77 + 78 + /*! 79 + @function ODQueryCreateWithNodeType 80 + @abstract Creates a query object that is initialized to a particular node type. 81 + @discussion Creates a query object that is initialized to a particular node type using the supplied 82 + query options. 83 + @param allocator a memory allocator to use for this object 84 + @param nodeType an ODNodeType to use when doing a query 85 + @param recordTypeOrList a ODRecordType of a type or CFArray with a list of record types 86 + @param attribute a ODAttributeType or CFStringRef of the attribute name to query 87 + @param matchType an ODMatchType value that signifies the type of query 88 + @param queryValueOrList a CFStringRef, CFDataRef or CFArrayRef of either type for values to query in attribute 89 + @param returnAttributeOrList a CFStringRef or CFArrayRef of CFStrings with the list of attributes to be returned 90 + from the query. Passing NULL is equivalent to passing kODAttributeTypeStandardOnly. 91 + @param maxResults a CFIndex of the total number of values the caller wants to be returned 92 + @param error an optional CFErrorRef reference for error details 93 + @result an ODQueryRef which should be passed into ODQueryCopyResults for immediate results or 94 + ODQueryScheduleWithRunLoop for background behavior, see ODQueryCallback for details on RunLoop 95 + behavior. 96 + */ 97 + CF_EXPORT 98 + ODQueryRef ODQueryCreateWithNodeType(CFAllocatorRef allocator, ODNodeType nodeType, CFTypeRef recordTypeOrList, ODAttributeType attribute, ODMatchType matchType, CFTypeRef queryValueOrList, CFTypeRef returnAttributeOrList, CFIndex maxResults, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 99 + 100 + /*! 101 + @function ODQueryCopyResults 102 + @abstract Returns results from a provided ODQueryRef synchronously 103 + @discussion Returns results from a provided ODQueryRef synchronously. Passing false to inAllowPartialResults 104 + will block the call until all results are returned or an error occurs. true can be passed at any time 105 + even if previous calls were made with false. 106 + @param query an ODQueryRef to use 107 + @param allowPartialResults a bool, passing true to retrieve any currently available results, or false to 108 + wait for all results 109 + @param error an optional CFErrorRef reference for error details 110 + @result a CFArrayRef comprised of ODRecord objects. If partial results were requested but are complete, then 111 + NULL will be returned with outError set to NULL. If an error occurs, NULL will be returned and 112 + outError should be checked accordingly. 113 + */ 114 + CF_EXPORT 115 + CFArrayRef ODQueryCopyResults(ODQueryRef query, bool allowPartialResults, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 116 + 117 + /*! 118 + @function ODQuerySynchronize 119 + @abstract Will dispose of any results and restart the query. 120 + @discussion Will dispose of any results and restart the query for subsequent ODQueryCopyResults. If the query 121 + is currently scheduled on a RunLoop, then the callback function will be called with inResults == NULL and 122 + inError.error == kODErrorQuerySynchronize and inError.domain == kODErrorDomainFramework, signifying that 123 + all existing results should be thrown away in preparation for new results. 124 + @param query an ODQueryRef to use 125 + */ 126 + CF_EXPORT 127 + void ODQuerySynchronize(ODQueryRef query) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 128 + 129 + /*! 130 + @function ODQuerySetCallback 131 + @abstract This call is used to set the callback function for an asynchronous query 132 + @discussion This call is used to set the callback function for an asynchronous query, using a 133 + CFRunLoop or a dispatch queue. 134 + @param query an ODQueryRef to use 135 + @param callback a function to call when a query has results to return 136 + @param userInfo a user-defined pointer to be passed back to the Query callback function 137 + */ 138 + CF_EXPORT 139 + void ODQuerySetCallback(ODQueryRef query, ODQueryCallback callback, void *userInfo) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 140 + 141 + /*! 142 + @function ODQueryScheduleWithRunLoop 143 + @abstract Allows a query to run off of a runloop, though it will spawn a thread to handle the work 144 + @discussion Allows a query to run off of a runloop, though it will spawn a thread to handle the work. 145 + When query is complete or stopped the callback function will be called with NULL results 146 + and inError set to NULL. ODQueryUnscheduleFromRunLoop() must be called to remove this query 147 + from Runloops if necessary. 148 + @param query an ODQueryRef to put on the runloop 149 + @param runLoop a CFRunLoopRef to put the ODQueryRef source onto 150 + @param runLoopMode a CFStringRef with the runloop mode to add the ODQueryRef to 151 + */ 152 + CF_EXPORT 153 + void ODQueryScheduleWithRunLoop(ODQueryRef query, CFRunLoopRef runLoop, CFStringRef runLoopMode) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 154 + 155 + /*! 156 + @function ODQueryUnscheduleFromRunLoop 157 + @abstract Removes the ODQueryRef from the provided runloop 158 + @discussion Removes the ODQueryRef from the provided runloop 159 + @param query an ODQueryRef to remove from the runloop 160 + @param runLoop a CFRunLoopRef to remove the ODQuery source from 161 + @param runLoopMode a CFStringRef of the mode to remove the ODQuery from 162 + */ 163 + CF_EXPORT 164 + void ODQueryUnscheduleFromRunLoop(ODQueryRef query, CFRunLoopRef runLoop, CFStringRef runLoopMode) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 165 + 166 + /*! 167 + @function ODQuerySetDispatchQueue 168 + @abstract Performs the query and sends the results using the specified dispatch queue 169 + @discussion Schedule the query to run and deliver its results using the specified dispatch queue. 170 + The previously set callback will be called using the same semantics as 171 + ODQueryScheduleWithRunLoop 172 + @param query an ODQueryRef to perform 173 + @param queue a dispatch queue to receive the query results 174 + */ 175 + CF_EXPORT 176 + void ODQuerySetDispatchQueue(ODQueryRef query, dispatch_queue_t queue) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 177 + 178 + __END_DECLS 179 + 180 + #endif /* ! __OPENDIRECTORY_CFODQUERY__ */
+578
src/OpenDirectory/CFOpenDirectory/Headers/CFODRecord.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__OPENDIRECTORY_CFODRECORD__) 25 + #define __OPENDIRECTORY_CFODRECORD__ 26 + 27 + #include <CFOpenDirectory/CFOpenDirectory.h> 28 + 29 + __BEGIN_DECLS 30 + 31 + /*! 32 + @function ODRecordGetTypeID 33 + @abstract Standard GetTypeID function support for CF-based objects 34 + @discussion Returns the typeID for the ODRecord object 35 + @result a valid CFTypeID for the ODRecord object 36 + */ 37 + CF_EXPORT 38 + CFTypeID ODRecordGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 39 + 40 + /*! 41 + @function ODRecordSetNodeCredentials 42 + @abstract Similar to calling ODNodeSetCredentials except credentials are only set for this particular record's node 43 + @discussion Sets the credentials if necessary on the ODNodeRef referenced by this ODRecordRef. Very similar to 44 + calling ODNodeSetCredentials except other records referencing the underlying ODNodeRef will not get 45 + authenticated, therefore inadvertant changes cannot occur. If all records referencing a particular 46 + ODNodeRef need to be updated, then use ODNodeSetCredentials on the original ODNodeRef instead. If the 47 + ODNodeRef is already authenticated with the same name and password, this will be a NOOP call. The original 48 + ODNodeRef held by an ODRecordRef will be released and a new ODNodeRef will be created when the credentials 49 + are set for this ODRecordRef. Calling this on multiple records could result in multiple References into the 50 + OpenDirectory daemon, which could cause errors logged into /var/log/system.log if a threshold is reached. 51 + @param record an ODRecordRef to use 52 + @param username a CFStringRef of the username used to authenticate 53 + @param password a CFStringRef of the password used to authenticate 54 + @param error an optional CFErrorRef reference for error details 55 + @result returns true on success, otherwise outError can be checked for details. Upon failure the original node 56 + will still be intact. 57 + */ 58 + CF_EXPORT 59 + bool ODRecordSetNodeCredentials(ODRecordRef record, CFStringRef username, CFStringRef password, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 60 + 61 + /*! 62 + @function ODRecordSetNodeCredentialsExtended 63 + @abstract Similar to calling ODNodeSetCredentialsExtended except credentials are only set for this particular record's 64 + node 65 + @discussion Allows the caller to use other types of authentications that are available in Open Directory, that may 66 + require response-request loops, etc. Not all OD plugins will support this call, look for 67 + kODErrorCredentialsMethodNotSupported in outError. Same behavior as ODRecordSetNodeCredentials. 68 + @param record an ODRecordRef to use 69 + @param recordType a ODRecordTypeRef of the type of record to do the authentication with 70 + @param authType a ODAuthenticationTypeRef of the type of authentication to be used (e.g., kDSStdAuthNTLMv2) 71 + @param authItems a CFArrayRef of CFData or CFString items that will be sent in order to the auth process 72 + @param outAuthItems a pointer to CFArrayRef that will be assigned to a CFArrayRef of CFData items if the 73 + call returned any values followup values 74 + @param outContext a pointer to ODContextRef if the call requires further calls for response-request auths. 75 + @param error an optional CFErrorRef reference for error details 76 + @result a bool will be returned with the result of the operation and outAuthItems set with response items 77 + and outContext set for any needed continuation. Upon failure the original node will still be intact. 78 + */ 79 + CF_EXPORT 80 + bool ODRecordSetNodeCredentialsExtended(ODRecordRef record, ODRecordType recordType, ODAuthenticationType authType, CFArrayRef authItems, CFArrayRef *outAuthItems, ODContextRef *outContext, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 81 + 82 + /*! 83 + @function ODRecordSetNodeCredentialsUsingKerberosCache 84 + @abstract Unsupported function. 85 + @discussion Unsupported function. 86 + */ 87 + CF_EXPORT 88 + bool ODRecordSetNodeCredentialsUsingKerberosCache(ODRecordRef record, CFStringRef cacheName, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_NA, __IPHONE_NA); 89 + 90 + /*! 91 + @function ODRecordCopyPasswordPolicy 92 + @abstract Returns a CFDictionaryRef of the effective policy for the user if available 93 + @discussion Returns a CFDictionaryRef of the effective policy for the user if available 94 + @param allocator a CFAllocatorRef to use 95 + @param record an ODRecordRef to use 96 + @param error an optional CFErrorRef reference for error details 97 + @result a CFDictionaryRef of the password policies for the supplied record, or NULL if no policy set 98 + */ 99 + CF_EXPORT 100 + CFDictionaryRef ODRecordCopyPasswordPolicy(CFAllocatorRef allocator, ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_9, __IPHONE_NA, __IPHONE_NA, "use ODRecordCopyEffectivePolicies"); 101 + 102 + /*! 103 + @function ODRecordVerifyPassword 104 + @abstract Verifies the password provided is valid for the record 105 + @discussion Verifies the password provided is valid for the record. 106 + @param record an ODRecordRef to use 107 + @param password a CFStringRef of the password that is being verified 108 + @param error an optional CFErrorRef reference for error details 109 + @result returns true on success, otherwise outError can be checked for details 110 + */ 111 + CF_EXPORT 112 + bool ODRecordVerifyPassword(ODRecordRef record, CFStringRef password, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 113 + 114 + /*! 115 + @function ODRecordVerifyPasswordExtended 116 + @abstract Allows use of other Open Directory types of authentications to verify a record password 117 + @discussion Allows the caller to use other types of authentications that are available in Open Directory, that may 118 + require response-request loops, etc. 119 + @param record an ODRecordRef to use 120 + @param authType a ODAuthenticationTypeRef of the type of authentication to be used (e.g., kODAuthenticationTypeCRAM_MD5) 121 + @param authItems a CFArrayRef of CFData or CFString items that will be sent in order to the auth process 122 + @param outAuthItems a pointer to CFArrayRef that will be assigned to a CFArrayRef of CFData items if the 123 + call returned any values followup values 124 + @param outContext a pointer to ODContextRef if the call requires further calls for response-request auths. 125 + @param error an optional CFErrorRef reference for error details 126 + @result a bool will be returned with the result of the operation and outAuthItems set with response items 127 + and outContext set for any needed continuation. Some ODNodes may not support the call so an error of 128 + eNotHandledByThisNode or eNotYetImplemented may be returned. 129 + */ 130 + CF_EXPORT 131 + bool ODRecordVerifyPasswordExtended(ODRecordRef record, ODAuthenticationType authType, CFArrayRef authItems, CFArrayRef *outAuthItems, ODContextRef *outContext, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 132 + 133 + /*! 134 + @function ODRecordChangePassword 135 + @abstract Changes the password of an ODRecord 136 + @discussion Changes the password of an ODRecord. If NULL is passed into inOldPassword, then an attempt to set 137 + the password will be tried. If changing a password, then both old and new passwords should be supplied. 138 + @param record an ODRecordRef to use 139 + @param oldPassword a CFString of the record's old password (NULL is optional). 140 + @param newPassword a CFString of the record's new password 141 + @param error an optional CFErrorRef reference for error details 142 + @result returns true on success, otherwise outError can be checked for details 143 + */ 144 + CF_EXPORT 145 + bool ODRecordChangePassword(ODRecordRef record, CFStringRef oldPassword, CFStringRef newPassword, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 146 + 147 + /*! 148 + @function ODRecordGetRecordType 149 + @abstract Returns the record type of an ODRecordRef 150 + @discussion Returns the record type of an ODRecordRef 151 + @param record an ODRecordRef to use 152 + @result a CFStringRef of the record type for this ODRecordRef 153 + */ 154 + CF_EXPORT 155 + CFStringRef ODRecordGetRecordType(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 156 + 157 + /*! 158 + @function ODRecordGetRecordName 159 + @abstract Returns the official record name of an ODRecordRef 160 + @discussion Returns the official record name of an ODRecordRef which typically corresponds to the first value 161 + of the kODAttributeTypeRecordName attribute, but not always. This name should be a valid name in either case. 162 + @param record an ODRecordRef to use 163 + @result a CFStringRef of the record name for this ODRecordRef 164 + */ 165 + CF_EXPORT 166 + CFStringRef ODRecordGetRecordName(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 167 + 168 + /*! 169 + @function ODRecordCopyValues 170 + @abstract Returns the value of an attribute as an array of CFStringRef or CFDataRef types 171 + @discussion Returns the value of an attribute as an array of CFStringRef or CFDataRef, depending on 172 + whether the data is Binary or not. If the value has been fetched from the directory previously 173 + a copy of the internal storage will be returned without going to the directory. If it has not been fetched 174 + previously, then it will be fetched at that time. 175 + @param record an ODRecordRef to use 176 + @param attribute a CFStringRef or ODAttributeType of the attribute (e.g., kODAttributeTypeRecordName, etc.) 177 + @param error an optional CFErrorRef reference for error details 178 + @result a CFArrayRef of the attribute requested if possible, or NULL if the attribute doesn't exist 179 + */ 180 + CF_EXPORT 181 + CFArrayRef ODRecordCopyValues(ODRecordRef record, ODAttributeType attribute, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 182 + 183 + /*! 184 + @function ODRecordSetValue 185 + @abstract Will take a CFDataRef or CFStringRef or a CFArrayRef of either type and set it for the attribute 186 + @discussion Will take a CFDataRef or CFStringRef or a CFArrayRef of either type and set it for the attribute. 187 + Any mixture of the types CFData and CFString are accepted. 188 + @param record an ODRecordRef to use 189 + @param attribute a CFStringRef of the attribute for values to be added too 190 + @param valueOrValues a CFArrayRef of CFStringRef or CFDataRef types or either of the individual types, passing 191 + an empty CFArray deletes the attribute. The underlying implementation will do this in the most efficient manner, 192 + either by adding only new values or completely replacing the values depending on the capabilities of the 193 + particular plugin. 194 + @param error an optional CFErrorRef reference for error details 195 + @result returns true on success, otherwise outError can be checked for details 196 + */ 197 + CF_EXPORT 198 + bool ODRecordSetValue(ODRecordRef record, ODAttributeType attribute, CFTypeRef valueOrValues, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 199 + 200 + /*! 201 + @function ODRecordAddValue 202 + @abstract Adds a value to an attribute 203 + @discussion Adds a value to an attribute. 204 + @param record an ODRecordRef to use 205 + @param attribute a CFStringRef of the attribute for values to be added too 206 + @param value a CFTypeRef of the value to be added to the attribute, either CFStringRef or CFDataRef 207 + @param error an optional CFErrorRef reference for error details 208 + @result returns true on success, otherwise outError can be checked for details 209 + */ 210 + CF_EXPORT 211 + bool ODRecordAddValue(ODRecordRef record, ODAttributeType attribute, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 212 + 213 + /*! 214 + @function ODRecordRemoveValue 215 + @abstract Removes a particular value from an attribute. 216 + @discussion Removes a particular value from an attribute. 217 + @param record an ODRecordRef to use 218 + @param attribute a CFStringRef of the attribute to remove the value from 219 + @param value a CFTypeRef of the value to be removed from the attribute. Either CFStringRef or CFDataRef. 220 + If the value does not exist, true will be returned and no error will be set. 221 + @param error an optional CFErrorRef reference for error details 222 + @result returns true on success, otherwise outError can be checked for details 223 + */ 224 + CF_EXPORT 225 + bool ODRecordRemoveValue(ODRecordRef record, ODAttributeType attribute, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 226 + 227 + /*! 228 + @function ODRecordCopyDetails 229 + @abstract Returns the attributes and values in the form of a key-value pair set for this record. 230 + @discussion Returns the attributes and values in the form of a key-value pair set for this record. The key is a 231 + CFStringRef or ODAttributeType of the attribute name (e.g., kODAttributeTypeRecordName, etc.) and the 232 + value is an CFArrayRef of either CFDataRef or CFStringRef depending on the type of data. Binary data will 233 + be returned as CFDataRef. 234 + @param record an ODRecordRef to use 235 + @param attributes a CFArrayRef of attributes. If an attribute has not been fetched previously, it will be 236 + fetched in order to return the value. If this parameter is NULL then all currently fetched attributes 237 + will be returned. 238 + @param error an optional CFErrorRef reference for error details 239 + @result a CFDictionaryRef of the attributes for the record 240 + */ 241 + CF_EXPORT 242 + CFDictionaryRef ODRecordCopyDetails(ODRecordRef record, CFArrayRef attributes, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 243 + 244 + /*! 245 + @function ODRecordSynchronize 246 + @abstract Synchronizes the record from the Directory in order to get current data and commit pending changes 247 + @discussion Synchronizes the record from the Directory in order to get current data. Any previously fetched attributes 248 + will be refetched from the Directory. This will not refetch the entire record, unless the entire record 249 + has been accessed. Additionally, any changes made to the record will be committed to the directory 250 + if the node does not do immediate commits. 251 + @param record an ODRecordRef to use 252 + @param error an optional CFErrorRef reference for error details 253 + */ 254 + CF_EXPORT 255 + bool ODRecordSynchronize(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 256 + 257 + /*! 258 + @function ODRecordDelete 259 + @abstract Deletes the record from the node and invalidates the record. 260 + @discussion Deletes the record from the node and invalidates the record. The ODRecordRef should be 261 + released after deletion. 262 + @param record an ODRecordRef to use 263 + @param error an optional CFErrorRef reference for error details 264 + @result returns true on success, otherwise outError can be checked for details 265 + */ 266 + CF_EXPORT 267 + bool ODRecordDelete(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 268 + 269 + /*! 270 + @function ODRecordAddMember 271 + @abstract Will add the record as a member of the group record that is provided 272 + @discussion Will add the record as a member of the group record that is provided in an appopriate manner 273 + based on what the directory will store. An error will be returned if the record is not a group record. 274 + Additionally, if the member record is not an appropriate type allowed as part of a group an 275 + error will be returned. 276 + @param group an ODRecordRef of the group record to modify 277 + @param member an ODRecordRef of the record to add to the group record 278 + @param error an optional CFErrorRef reference for error details 279 + @result returns true on success, otherwise outError can be checked for details 280 + */ 281 + CF_EXPORT 282 + bool ODRecordAddMember(ODRecordRef group, ODRecordRef member, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 283 + 284 + /*! 285 + @function ODRecordRemoveMember 286 + @abstract Will remove the record as a member from the group record that is provided 287 + @discussion Will remove the record as a member from the group record that is provided. If the record type 288 + of group is not a Group, false will be returned with an appropriate error. 289 + @param group an ODRecordRef of the group record to modify 290 + @param member an ODRecordRef of the record to remove from the group record 291 + @param error an optional CFErrorRef reference for error details 292 + @result returns true on success, otherwise outError can be checked for details 293 + */ 294 + CF_EXPORT 295 + bool ODRecordRemoveMember(ODRecordRef group, ODRecordRef member, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 296 + 297 + /*! 298 + @function ODRecordContainsMember 299 + @abstract Will use membership APIs to resolve group membership based on Group and Member record combination 300 + @discussion Will use membership APIs to resolve group membership based on Group and Member record combination. 301 + This API does not check attributes values directly, instead uses system APIs to deal with nested 302 + memberships. 303 + @param group an ODRecordRef of the group to be checked for membership 304 + @param member an ODRecordRef of the member to be checked against the group 305 + @param error an optional CFErrorRef reference for error details 306 + @result returns true or false depending on result 307 + */ 308 + CF_EXPORT 309 + bool ODRecordContainsMember(ODRecordRef group, ODRecordRef member, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 310 + 311 + /*! 312 + @function ODRecordCopyPolicies 313 + @abstract This will copy any policies configured for the record. 314 + @discussion This will copy any policies configured for the record. 315 + @param record an ODRecordRef to use 316 + @param error an optional CFErrorRef reference for error details 317 + @result a CFDictionaryRef containing all currently configured policies 318 + */ 319 + CF_EXPORT 320 + CFDictionaryRef ODRecordCopyPolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordCopyAccountPolicies"); 321 + 322 + /*! 323 + @function ODRecordCopyEffectivePolicies 324 + @abstract This will copy the effective policies for the record (merging any node-level policies). 325 + @discussion This will copy the effective policies for the record (merging any node-level policies). 326 + @param record an ODRecordRef to use 327 + @param error an optional CFErrorRef reference for error details 328 + @result a CFDictionaryRef containing all currently configured policies (merging any node-level policies) 329 + */ 330 + CF_EXPORT 331 + CFDictionaryRef ODRecordCopyEffectivePolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordAuthenticationAllowed and similar functions"); 332 + 333 + /*! 334 + @function ODRecordCopySupportedPolicies 335 + @abstract This will return a dictionary of supported policies. 336 + @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed 337 + for the policy in question. For example, if password history is available, it will state how much history is 338 + supported. 339 + @param record an ODRecordRef to use 340 + @param error an optional CFErrorRef reference for error details 341 + @result a CFDictionaryRef containing all currently supported policies 342 + */ 343 + CF_EXPORT 344 + CFDictionaryRef ODRecordCopySupportedPolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA); 345 + 346 + /*! 347 + @function ODRecordSetPolicies 348 + @abstract This will set the policy for the record. 349 + @discussion This will set the policy for the record. Policies are evaluated in combination with node-level policies. 350 + @param record an ODRecordRef to use 351 + @param policies a CFDictionary of policies to be set 352 + @param error an optional CFErrorRef reference for error details 353 + @result a bool which signifies if the policy set succeeded, otherwise error is set. 354 + */ 355 + CF_EXPORT 356 + bool ODRecordSetPolicies(ODRecordRef record, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordSetAccountPolicies"); 357 + 358 + /*! 359 + @function ODRecordSetPolicy 360 + @abstract This will set a specific policy setting for the record. 361 + @discussion This will set a specific policy setting for the record. 362 + @param record an ODRecordRef to use 363 + @param policy a valid ODPolicyType 364 + @param value a CFTypeRef to be set (should be of appropriate type for the policy) 365 + @param error an optional CFErrorRef reference for error details 366 + @result a bool which signifies if the policy set succeeded, otherwise error is set. 367 + */ 368 + CF_EXPORT 369 + bool ODRecordSetPolicy(ODRecordRef record, ODPolicyType policy, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordAddAccountPolicy"); 370 + 371 + /*! 372 + @function ODRecordRemovePolicy 373 + @abstract This will remove a specific policy setting from the record. 374 + @discussion This will remove a specific policy setting from the record. 375 + @param record an ODRecordRef to use 376 + @param policy a valid ODPolicyType 377 + @param error an optional CFErrorRef reference for error details 378 + @result a bool which signifies if the policy removal succeeded, otherwise error is set. 379 + */ 380 + CF_EXPORT 381 + bool ODRecordRemovePolicy(ODRecordRef record, ODPolicyType policy, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordRemoveAccountPolicy"); 382 + 383 + /*! 384 + @function ODRecordAddAccountPolicy 385 + @abstract This will add an account policy to the record for the specified category. 386 + @discussion This will add an account policy to the record for the specified category. 387 + The node-level and record-level policies will be combined and 388 + evaluated as appropriate, ensuring the strongest policy is enforced. 389 + @param record an ODRecordRef to use. 390 + @param policy a dictionary containing the specific policy to be added. 391 + The dictionary may contain the following keys: 392 + kODPolicyKeyIdentifier a required key identifying the policy. 393 + kODPolicyKeyParameters an optional key containing a dictionary of 394 + parameters that can be used for informational purposes or in 395 + the policy format string. 396 + kODPolicyKeyContent a required key specifying the policy, 397 + from which a predicate will be created for evaluating 398 + the policy. 399 + @param category a valid ODPolicyCategoryType to which the policy will be added. 400 + @param error is an optional CFErrorRef reference for error details. 401 + @result a bool which signifies if the policy addition succeeded, otherwise error is set. 402 + */ 403 + CF_EXPORT 404 + bool ODRecordAddAccountPolicy(ODRecordRef record, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 405 + 406 + /*! 407 + @function ODRecordRemoveAccountPolicy 408 + @abstract This will remove an account policy from the record for the specified category. 409 + @discussion This will remove an account policy from the record for the specified category. 410 + @param record an ODRecordRef to use. 411 + @param policy a dictionary containing the specific policy to be 412 + removed, with the same format as described in ODRecordAddAccountPolicy. 413 + @param category a valid ODPolicyCategoryType from which the policy will be removed. 414 + @param error an optional CFErrorRef reference for error details. 415 + @result a bool which signifies if the policy removal succeeded, otherwise error is set. 416 + */ 417 + CF_EXPORT 418 + bool ODRecordRemoveAccountPolicy(ODRecordRef record, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 419 + 420 + /*! 421 + @function ODRecordSetAccountPolicies 422 + @abstract This will set the policies for the record. 423 + @discussion This will set the policies for the record, replacing any 424 + existing policies. All of the policies in the set will be 425 + applied to the record when policies are evaluated. 426 + @param record an ODRecordRef to use. 427 + @param policies a dictionary containing all of the policies to be set 428 + for the node. The dictionary may contain the following keys: 429 + kODPolicyCategoryAuthentication an optional key with a value 430 + of an array of policy dictionaries that specify when 431 + authentications should be allowed. 432 + kODPolicyCategoryPasswordContent an optional key with a 433 + value of an array of policy dictionaries the specify the 434 + required content of passwords. 435 + kODPolicyCategoryPasswordChange an optional key with a value 436 + of an array of policy dictionaries that specify when 437 + passwords are required to be changed. 438 + @param error an optional CFErrorRef reference for error details. 439 + @result a bool which signifies if the policy set succeeded, otherwise error is set. 440 + */ 441 + CF_EXPORT 442 + bool ODRecordSetAccountPolicies(ODRecordRef record, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 443 + 444 + /*! 445 + @function ODRecordCopyAccountPolicies 446 + @abstract This will copy any policies configured for the record. 447 + @discussion This will copy any policies configured for the record. Does not 448 + copy any policies set for the node. 449 + @param record an ODRecordRef to use. 450 + @param error an optional CFErrorRef reference for error details. 451 + @result a CFDictionaryRef containing all currently set policies. The 452 + format of the dictionary is the same as described in 453 + ODRecordSetAccountPolicies(). 454 + */ 455 + CF_EXPORT CF_RETURNS_RETAINED 456 + CFDictionaryRef ODRecordCopyAccountPolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 457 + 458 + /*! 459 + @function ODRecordAuthenticationAllowed 460 + @abstract Determines if policies allow the account to authenticate. 461 + @discussion Determines if policies allow the account to authenticate. 462 + Authentication and password change policies are evaluated. 463 + Record-level and node-level policies are evaluated in 464 + combination, with record-level taking precedence over node-level 465 + policies. The failure of any single policy will deny the 466 + authentication. 467 + 468 + This check is only definitive at the time it was requested. The 469 + policy or the environment could change before the authentication 470 + is actually requested. Errors from the authentication request 471 + should be consulted. 472 + 473 + It is not necessary to call this function when callingg 474 + ODRecordVerifyPassword or ODRecordVerifyPasswordExtended 475 + since those functions perform same policy evaluation. 476 + 477 + @param record an ODRecordRef to use. 478 + @param error an optional CFErrorRef reference for error details. 479 + @result a bool which signifies if the authentication is allowed, otherwise error is set. 480 + */ 481 + CF_EXPORT 482 + bool ODRecordAuthenticationAllowed(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 483 + 484 + /*! 485 + @function ODRecordPasswordChangeAllowed 486 + @abstract Determines if policies allow the password change. 487 + @discussion Determines if policies allow the password change. Password 488 + content policies are evaluated. Record-level and node-level 489 + policies are evaluated in combination, with record-level taking 490 + precedence over node-level policies. The failure of any single 491 + policy will deny the password change. 492 + 493 + This check is only definitive at the time it was requested. The 494 + policy or the environment could change before the password change 495 + is actually requested. Errors from the password change request 496 + should be consulted. 497 + 498 + @param record an ODRecordRef to use. 499 + @param newPassword contains the password to be evaluated. 500 + @param error an optional CFErrorRef reference for error details. 501 + @result a bool which signifies if the password change is allowed, otherwise error is set. 502 + */ 503 + CF_EXPORT 504 + bool ODRecordPasswordChangeAllowed(ODRecordRef record, CFStringRef newPassword, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 505 + 506 + /*! 507 + @function ODRecordWillPasswordExpire 508 + @abstract Determines if the password will expire within the specified time. 509 + @discussion Determines if the password will expire (i.e. need to be changed) 510 + between now and the specified number of seconds in the future. 511 + Record-level and node-level policies are evaluated 512 + together, with record-level taking precedence over node-level 513 + policies. 514 + @param record an ODRecordRef to use. 515 + @param willExpireIn the number of seconds from the current time to be 516 + used as the upper-bound for the password expiration period. 517 + @result a bool which signifies if the password will expire within the 518 + specified time. 519 + */ 520 + CF_EXPORT 521 + bool ODRecordWillPasswordExpire(ODRecordRef record, uint64_t willExpireIn) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 522 + 523 + /*! 524 + @function ODRecordWillAuthenticationsExpire 525 + @abstract Determines if authentications will expire within the specified time. 526 + @discussion Determines if authentications will expire (i.e. session and/or 527 + account expires) between now and the specified number of seconds 528 + in the future. Record-level and node-level policies are evaluated 529 + together, with record-level taking precedence over node-level 530 + policies. 531 + @param record an ODRecordRef to use. 532 + @param willExpireIn the number of seconds from the current time to be 533 + used as the upper-bound for the authentication expiration period. 534 + @result a bool which signifies if authentications will expire within the 535 + specified time. 536 + */ 537 + CF_EXPORT 538 + bool ODRecordWillAuthenticationsExpire(ODRecordRef record, uint64_t willExpireIn) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 539 + 540 + /*! 541 + @function ODRecordSecondsUntilPasswordExpires 542 + @abstract Determines how many seconds until the password expires. 543 + @discussion Determines how many seconds until the password expires (i.e. 544 + needs changing). Password change policies are evaluated. 545 + Record-level and node-level policies are evaluated in 546 + combination, with record-level taking precedence over node-level 547 + policies. 548 + @param record an ODRecordRef to use. 549 + @result the number of seconds until the password expires. If multiple 550 + policies will cause the password to expire, the soonest 551 + expiration time is returned. If already expired, 552 + kODExpirationTimeExpired is returned. If there are no password 553 + change policies, kODExpirationTimeNeverExpires is returned. 554 + */ 555 + CF_EXPORT 556 + int64_t ODRecordSecondsUntilPasswordExpires(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 557 + 558 + /*! 559 + @function ODRecordSecondsUntilAuthenticationsExpire 560 + @abstract Determines how many seconds until authentications expire. 561 + @discussion Determines how many seconds until authentications expire (i.e. 562 + session and/or account expires). Record-level and node-level 563 + policies are evaluated together, with record-level taking 564 + precedence over node-level policies 565 + @param record an ODRecordRef to use. 566 + @result the number of seconds until authentications expire. If multiple 567 + policies will cause authentications to expire, the soonest 568 + expiration time is returned. If already expired, 569 + kODExpirationTimeExpired is returned. If there are no 570 + authentication policies controlling expiration, 571 + kODExpirationTimeNeverExpires is returned. 572 + */ 573 + CF_EXPORT 574 + int64_t ODRecordSecondsUntilAuthenticationsExpire(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 575 + 576 + __END_DECLS 577 + 578 + #endif /* ! __OPENDIRECTORY_CFODRECORD__ */
+83
src/OpenDirectory/CFOpenDirectory/Headers/CFODSession.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__OPENDIRECTORY_CFODSESSION__) 25 + #define __OPENDIRECTORY_CFODSESSION__ 26 + 27 + #include <CFOpenDirectory/CFOpenDirectory.h> 28 + 29 + /*! 30 + @const kODSessionDefault 31 + @abstract is the default type of ODSessionRef used if there is no need to create a specific reference 32 + @discussion is the default type of ODSessionRef used if there is no need to create a specific reference 33 + */ 34 + CF_EXPORT 35 + ODSessionRef kODSessionDefault __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 36 + 37 + __BEGIN_DECLS 38 + 39 + /*! 40 + @function ODSessionGetTypeID 41 + @abstract Standard GetTypeID function support for CF-based objects 42 + @discussion Returns the typeID for ODSession objects 43 + @result a valid CFTypeID for the ODSession object 44 + */ 45 + CF_EXPORT 46 + CFTypeID ODSessionGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 47 + 48 + /*! 49 + @function ODSessionCreate 50 + @abstract Creates an ODSession object to be passed to ODNode functions 51 + @discussion Creates an ODSession object to be passed to ODNode functions. 52 + @param allocator a memory allocator to use for this object 53 + @param options a CFDictionary of options associated with this ODSession. This is typically NULL 54 + unless caller needs to proxy to another host. 55 + 56 + If proxy is required then a dictionary with keys should be: 57 + Key Value 58 + kODSessionProxyAddress CFString(hostname or IP) 59 + kODSessionProxyPort CFNumber(IP port, should not be set as it will default) 60 + kODSessionProxyUsername CFString(username) 61 + kODSessionProxyPassword CFString(password) 62 + @param error an optional CFErrorRef reference for error details 63 + @result a valid ODSessionRef object or NULL if it cannot be created. Pass reference to CFErrorRef to 64 + get error details 65 + */ 66 + CF_EXPORT 67 + ODSessionRef ODSessionCreate(CFAllocatorRef allocator, CFDictionaryRef options, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 68 + 69 + /*! 70 + @function ODSessionCopyNodeNames 71 + @abstract Returns the node names that are registered on this ODSession 72 + @discussion Returns the node names that are registered on this ODSession 73 + @param allocator a memory allocator to use for this object 74 + @param session an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed 75 + @param error an optional CFErrorRef reference for error details 76 + @result a valid CFArrayRef of node names that can be opened on the session reference 77 + */ 78 + CF_EXPORT 79 + CFArrayRef ODSessionCopyNodeNames(CFAllocatorRef allocator, ODSessionRef session, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 80 + 81 + __END_DECLS 82 + 83 + #endif /* !__OPENDIRECTORY_CFODSESSION__ */
+75
src/OpenDirectory/CFOpenDirectory/Headers/CFOpenDirectory.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__OPENDIRECTORY_CFOPENDIRECTORY__) 25 + #define __OPENDIRECTORY_CFOPENDIRECTORY__ 1 26 + 27 + #include <CoreFoundation/CoreFoundation.h> 28 + 29 + /*! 30 + @typedef ODContextRef 31 + @abstract Opaque reference for the ODContext object 32 + */ 33 + typedef const struct __ODContext *ODContextRef; 34 + 35 + /*! 36 + @typedef ODNodeRef 37 + @abstract Opaque reference for the ODNode object 38 + */ 39 + typedef struct __ODNode *ODNodeRef; 40 + 41 + /*! 42 + @typedef ODQueryRef 43 + @abstract Opaque reference for the ODQuery object 44 + */ 45 + typedef struct __ODQuery *ODQueryRef; 46 + 47 + /*! 48 + @typedef ODRecordRef 49 + @abstract Opaque reference for the ODRecord object 50 + */ 51 + typedef struct __ODRecord *ODRecordRef; 52 + 53 + /*! 54 + @typedef ODSessionRef 55 + @abstract Opaque reference for ODSession object 56 + */ 57 + typedef struct __ODSession *ODSessionRef; 58 + 59 + /*! 60 + @const kODErrorDomainFramework 61 + @abstract the error domain for OpenDirectory.framework details 62 + @discussion the error domain for OpenDirectory.framework details 63 + */ 64 + CF_EXPORT 65 + const CFStringRef kODErrorDomainFramework __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 66 + 67 + #include <CFOpenDirectory/CFOpenDirectoryConstants.h> 68 + 69 + #include <CFOpenDirectory/CFODContext.h> 70 + #include <CFOpenDirectory/CFODNode.h> 71 + #include <CFOpenDirectory/CFODQuery.h> 72 + #include <CFOpenDirectory/CFODRecord.h> 73 + #include <CFOpenDirectory/CFODSession.h> 74 + 75 + #endif /* ! __OPENDIRECTORY_CFOPENDIRECTORY__ */
+4188
src/OpenDirectory/CFOpenDirectory/Headers/CFOpenDirectoryConstants.h
··· 1 + /* 2 + * Copyright (c) 2009-2011 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if !defined(__ODCONSTANTS_H) 25 + #define __ODCONSTANTS_H 26 + 27 + /*! 28 + @const kODSessionProxyAddress 29 + @abstract the address to connect to via proxy, used when making the options dictionary 30 + @discussion the address to connect to via proxy, used when making the options dictionary 31 + */ 32 + CF_EXPORT 33 + const CFStringRef kODSessionProxyAddress __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 34 + 35 + /*! 36 + @const kODSessionProxyPort 37 + @abstract the port to connect to via proxy, used when making the options dictionary 38 + @discussion the port to connect to via proxy, used when making the options dictionary. This parameter 39 + is optional and should not be passed normally. 40 + */ 41 + CF_EXPORT 42 + const CFStringRef kODSessionProxyPort __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 43 + 44 + /*! 45 + @const kODSessionProxyUsername 46 + @abstract the username to connect with via proxy, used when making the options dictionary 47 + @discussion the username to connect with via proxy, used when making the options dictionary 48 + */ 49 + CF_EXPORT 50 + const CFStringRef kODSessionProxyUsername __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 51 + 52 + /*! 53 + @const kODSessionProxyPassword 54 + @abstract the password to connect with via proxy, used when making the options dictionary 55 + @discussion the password to connect with via proxy, used when making the options dictionary 56 + */ 57 + CF_EXPORT 58 + const CFStringRef kODSessionProxyPassword __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 59 + 60 + /*! 61 + @const kODModuleConfigOptionQueryTimeout 62 + @abstract number of seconds before a query times out 63 + @discussion number of seconds before a query times out 64 + */ 65 + CF_EXPORT 66 + const CFStringRef kODModuleConfigOptionQueryTimeout __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 67 + /*! 68 + @const kODModuleConfigOptionConnectionSetupTimeout 69 + @abstract number of seconds before a connection attempt times out 70 + @discussion number of seconds before a connection attempt times out 71 + */ 72 + CF_EXPORT 73 + const CFStringRef kODModuleConfigOptionConnectionSetupTimeout __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 74 + /*! 75 + @const kODModuleConfigOptionConnectionIdleDisconnect 76 + @abstract number of seconds before a connection is idle disconnected 77 + @discussion number of seconds before a connection is idle disconnected 78 + */ 79 + CF_EXPORT 80 + const CFStringRef kODModuleConfigOptionConnectionIdleDisconnect __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 81 + /*! 82 + @const kODModuleConfigOptionPacketSigning 83 + @abstract enable or disable packet signing 84 + @discussion number of seconds before a query times out 85 + */ 86 + CF_EXPORT 87 + const CFStringRef kODModuleConfigOptionPacketSigning __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 88 + /*! 89 + @const kODModuleConfigOptionPacketEncryption 90 + @abstract enable or disable packet encryption 91 + @discussion enable or disable packet encryption 92 + */ 93 + CF_EXPORT 94 + const CFStringRef kODModuleConfigOptionPacketEncryption __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 95 + /*! 96 + @const kODModuleConfigOptionManInTheMiddle 97 + @abstract enable or disable man-in-middle countermeasures 98 + @discussion enable or disable man-in-middle countermeasures 99 + */ 100 + CF_EXPORT 101 + const CFStringRef kODModuleConfigOptionManInTheMiddle __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 102 + /*! 103 + @enum ODNodeType 104 + @abstract Types of nodes that can be opened 105 + @discussion Various types of nodes that can be opened. 106 + @constant kODNodeTypeAuthentication is a node type commonly used for all authentications or record lookups 107 + @constant kODNodeTypeContacts is a node type commonly used for applications that deal with contact data 108 + @constant kODNodeTypeNetwork is a node type used for looking for network resource type data 109 + @constant kODNodeTypeLocalNodes is a node type that specifically looks at the local directory 110 + @constant kODNodeTypeConfigure is a node type that refers to the configuration node within DS 111 + */ 112 + enum 113 + { 114 + kODNodeTypeAuthentication = 0x2201, 115 + kODNodeTypeContacts = 0x2204, 116 + kODNodeTypeNetwork = 0x2205, /* deprecated, behaves identically to kODNodeTypeAuthentication */ 117 + 118 + kODNodeTypeLocalNodes = 0x2200, 119 + kODNodeTypeConfigure = 0x2202 120 + }; 121 + typedef uint32_t ODNodeType; 122 + 123 + /*! 124 + @const kODNodeOptionsQuerySkippedSubnode 125 + @abstract Used with nodes that support options. 126 + @discussion Passed in an options dictionary where the value is a boolean (kCFBooleanTrue/kCFBooleanFalse). 127 + If a node supports the option it will notify the client when a subnode is skipped during queries. 128 + Supported options are listed in node details under kODAttributeTypeNodeOptions. Node may fail to 129 + open if unsupported options are used. 130 + */ 131 + CF_EXPORT 132 + const CFStringRef kODNodeOptionsQuerySkippedSubnode __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA); 133 + 134 + /*! 135 + @enum ODMatchType 136 + @abstract Are types of matching types used for doing searches. Each type is self explanatory based on the name. 137 + @constant kODMatchAny is used to search for any records (typically passed with nil search value) 138 + @constant kODMatchEqualTo is searching values that are equal to the provided value 139 + @constant kODMatchBeginsWith is searching values that begin with the provided value 140 + @constant kODMatchContains is searching values that contain the provided value 141 + @constant kODMatchEndsWith is searching values that end with the provided value 142 + @constant kODMatchGreaterThan is searching values greater than the provided value 143 + @constant kODMatchLessThan is searching values less than the provided value 144 + */ 145 + enum 146 + { 147 + kODMatchAny = 0x0001, 148 + 149 + kODMatchEqualTo = 0x2001, 150 + kODMatchBeginsWith = 0x2002, 151 + kODMatchContains = 0x2004, 152 + kODMatchEndsWith = 0x2003, 153 + 154 + kODMatchInsensitiveEqualTo __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2101, 155 + kODMatchInsensitiveBeginsWith __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2102, 156 + kODMatchInsensitiveContains __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2104, 157 + kODMatchInsensitiveEndsWith __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2103, 158 + 159 + kODMatchGreaterThan = 0x2006, 160 + kODMatchLessThan = 0x2007, 161 + }; 162 + typedef uint32_t ODMatchType; 163 + 164 + /*! 165 + @typedef ODRecordType 166 + @abstract is used to define a specific record type 167 + @discussion is used to define a specific record type common to DirectoryService. 168 + Records types are strings that have a prefix: 169 + 170 + Standard records - "dsRecTypeStandard:" 171 + Native to the node - "dsRecTypeNative:" 172 + 173 + The most commonly used Standard records are contained in this header. 174 + 175 + Note: CFStringRef can be use interchangeably with ODRecordType for ease 176 + of use. 177 + */ 178 + #ifdef __OBJC__ 179 + #include <Foundation/Foundation.h> 180 + typedef NSString *ODRecordType; 181 + #else 182 + typedef CFStringRef ODRecordType; 183 + #endif 184 + 185 + /*! 186 + @typedef ODAttributeType 187 + @abstract is used to define a specific attribute type 188 + @discussion is used to define a specific attribute type common to DirectoryService. 189 + Attribute types are strings that have a prefix: 190 + 191 + Standard attributes - "dsAttrTypeStandard:" 192 + Native to the node - "dsAttrTypeNative:" 193 + 194 + The most commonly used Standard attributes are contained in this header. 195 + 196 + Note: CFStringRef can be use interchangeably with ODAttributeType for ease 197 + of use. 198 + */ 199 + #ifdef __OBJC__ 200 + typedef NSString *ODAttributeType; 201 + #else 202 + typedef CFStringRef ODAttributeType; 203 + #endif 204 + 205 + /*! 206 + @typedef ODAuthenticationType 207 + @abstract is used to define a specific credential method type 208 + @discussion is used to define a specific credential method type common to DirectoryService. 209 + Authentication types are strings that have a prefix: 210 + 211 + Standard attributes - "dsAuthMethodStandard:" 212 + Native to the node - "dsAuthMethodNative:" 213 + 214 + The most commonly used Standard authentications are contained in this header. 215 + 216 + Note: CFStringRef can be use interchangeably with ODAuthenticationType for ease 217 + of use. 218 + */ 219 + #ifdef __OBJC__ 220 + typedef NSString *ODAuthenticationType; 221 + #else 222 + typedef CFStringRef ODAuthenticationType; 223 + #endif 224 + 225 + /*! 226 + @typedef ODPolicyType 227 + @abstract is used to modify policies on nodes or records 228 + @discussion is used to modify policies on nodes or records 229 + */ 230 + #ifdef __OBJC_ 231 + typedef NSString *ODPolicyType; 232 + #else 233 + typedef CFStringRef ODPolicyType; 234 + #endif 235 + 236 + // Compatibility 237 + typedef ODRecordType _ODRecordType; 238 + typedef ODAttributeType _ODAttributeType; 239 + typedef ODAuthenticationType _ODAuthenticationType; 240 + 241 + #pragma mark Record Types 242 + 243 + /*! 244 + @const kODRecordTypeAttributeTypes 245 + @abstract Identifies records that represent each possible attribute type. 246 + @discussion Identifies records that represent each possible attribute type. 247 + */ 248 + CF_EXPORT 249 + const ODRecordType kODRecordTypeAttributeTypes; 250 + 251 + /*! 252 + @const kODRecordTypeAFPServer 253 + @abstract Record type of AFP server records. 254 + @discussion Record type of AFP server records. 255 + */ 256 + CF_EXPORT 257 + const ODRecordType kODRecordTypeAFPServer; 258 + 259 + /*! 260 + @const kODRecordTypeAliases 261 + @abstract Used to represent alias records. 262 + @discussion Used to represent alias records. 263 + */ 264 + CF_EXPORT 265 + const ODRecordType kODRecordTypeAliases; 266 + 267 + /*! 268 + @const kODRecordTypeAugments 269 + @abstract Used to store augmented record data. 270 + @discussion Used to store augmented record data. 271 + */ 272 + CF_EXPORT 273 + const ODRecordType kODRecordTypeAugments; 274 + 275 + /*! 276 + @const kODRecordTypeAutomount 277 + @abstract Used to store automount record data. 278 + @discussion Used to store automount record data. 279 + */ 280 + CF_EXPORT 281 + const ODRecordType kODRecordTypeAutomount; 282 + 283 + /*! 284 + @const kODRecordTypeAutomountMap 285 + @abstract Used to store automountMap record data. 286 + @discussion Used to store automountMap record data. 287 + */ 288 + CF_EXPORT 289 + const ODRecordType kODRecordTypeAutomountMap; 290 + 291 + /*! 292 + @const kODRecordTypeAutoServerSetup 293 + @abstract Used to discover automated server setup information. 294 + @discussion Used to discover automated server setup information. 295 + */ 296 + CF_EXPORT 297 + const ODRecordType kODRecordTypeAutoServerSetup; 298 + 299 + /*! 300 + @const kODRecordTypeBootp 301 + @abstract Record in the local node for storing bootp info. 302 + @discussion Record in the local node for storing bootp info. 303 + */ 304 + CF_EXPORT 305 + const ODRecordType kODRecordTypeBootp; 306 + 307 + /*! 308 + @const kODRecordTypeCertificateAuthorities 309 + @abstract Record type that contains certificate authority information. 310 + @discussion Record type that contains certificate authority information. 311 + */ 312 + CF_EXPORT 313 + const ODRecordType kODRecordTypeCertificateAuthorities; 314 + 315 + /*! 316 + @const kODRecordTypeComputerLists 317 + @abstract Identifies computer list records. 318 + @discussion Identifies computer list records. 319 + */ 320 + CF_EXPORT 321 + const ODRecordType kODRecordTypeComputerLists; 322 + 323 + /*! 324 + @const kODRecordTypeComputerGroups 325 + @abstract Identifies computer group records. 326 + @discussion Identifies computer group records. 327 + */ 328 + CF_EXPORT 329 + const ODRecordType kODRecordTypeComputerGroups; 330 + 331 + /*! 332 + @const kODRecordTypeComputers 333 + @abstract Identifies computer records. 334 + @discussion Identifies computer records. 335 + */ 336 + CF_EXPORT 337 + const ODRecordType kODRecordTypeComputers; 338 + 339 + /*! 340 + @const kODRecordTypeConfiguration 341 + @abstract Identifies configuration records. 342 + @discussion Identifies configuration records. 343 + */ 344 + CF_EXPORT 345 + const ODRecordType kODRecordTypeConfiguration; 346 + 347 + /*! 348 + @const kODRecordTypeEthernets 349 + @abstract Record in the node for storing ethernets. 350 + @discussion Record in the node for storing ethernets. 351 + */ 352 + CF_EXPORT 353 + const ODRecordType kODRecordTypeEthernets; 354 + 355 + /*! 356 + @const kODRecordTypeFileMakerServers 357 + @abstract FileMaker servers record type. 358 + @discussion FileMaker servers record type that describes available FileMaker servers, 359 + used for service discovery. 360 + */ 361 + CF_EXPORT 362 + const ODRecordType kODRecordTypeFileMakerServers; 363 + 364 + /*! 365 + @const kODRecordTypeFTPServer 366 + @abstract Identifies ftp server records. 367 + @discussion Identifies ftp server records. 368 + */ 369 + CF_EXPORT 370 + const ODRecordType kODRecordTypeFTPServer; 371 + 372 + /*! 373 + @const kODRecordTypeGroups 374 + @abstract Identifies group records. 375 + @discussion Identifies group records. 376 + */ 377 + CF_EXPORT 378 + const ODRecordType kODRecordTypeGroups; 379 + 380 + /*! 381 + @const kODRecordTypeHostServices 382 + @abstract Record in the local node for storing host services. 383 + @discussion Record in the local node for storing host services. 384 + */ 385 + CF_EXPORT 386 + const ODRecordType kODRecordTypeHostServices; 387 + 388 + /*! 389 + @const kODRecordTypeHosts 390 + @abstract Identifies host records. 391 + @discussion Identifies host records. 392 + */ 393 + CF_EXPORT 394 + const ODRecordType kODRecordTypeHosts; 395 + 396 + /*! 397 + @const kODRecordTypeLDAPServer 398 + @abstract Identifies LDAP server records. 399 + @discussion Identifies LDAP server records. 400 + */ 401 + CF_EXPORT 402 + const ODRecordType kODRecordTypeLDAPServer; 403 + 404 + /*! 405 + @const kODRecordTypeLocations 406 + @abstract Location record type. 407 + @discussion Location record type. 408 + */ 409 + CF_EXPORT 410 + const ODRecordType kODRecordTypeLocations; 411 + 412 + /*! 413 + @const kODRecordTypeMounts 414 + @abstract Identifies mount records. 415 + @discussion Identifies mount records. 416 + */ 417 + CF_EXPORT 418 + const ODRecordType kODRecordTypeMounts; 419 + 420 + /*! 421 + @const kODRecordTypeNFS 422 + @abstract Identifies NFS records. 423 + @discussion Identifies NFS records. 424 + */ 425 + CF_EXPORT 426 + const ODRecordType kODRecordTypeNFS; 427 + 428 + /*! 429 + @const kODRecordTypeNetDomains 430 + @abstract Record in the local node for storing net domains. 431 + @discussion Record in the local node for storing net domains. 432 + */ 433 + CF_EXPORT 434 + const ODRecordType kODRecordTypeNetDomains; 435 + 436 + /*! 437 + @const kODRecordTypeNetGroups 438 + @abstract Record in the local node for storing net groups. 439 + @discussion Record in the local node for storing net groups. 440 + */ 441 + CF_EXPORT 442 + const ODRecordType kODRecordTypeNetGroups; 443 + 444 + /*! 445 + @const kODRecordTypeNetworks 446 + @abstract Identifies network records. 447 + @discussion Identifies network records. 448 + */ 449 + CF_EXPORT 450 + const ODRecordType kODRecordTypeNetworks; 451 + 452 + /*! 453 + @const kODRecordTypePeople 454 + @abstract Record type that contains "People" records used for contact information. 455 + @discussion Record type that contains "People" records used for contact information. 456 + */ 457 + CF_EXPORT 458 + const ODRecordType kODRecordTypePeople; 459 + 460 + /*! 461 + @const kODRecordTypePresetComputers 462 + @abstract The computer record type used for presets in record creation. 463 + @discussion The computer record type used for presets in record creation. 464 + */ 465 + CF_EXPORT 466 + const ODRecordType kODRecordTypePresetComputers; 467 + 468 + /*! 469 + @const kODRecordTypePresetComputerGroups 470 + @abstract The computer group record type used for presets in record creation. 471 + @discussion The computer group record type used for presets in record creation. 472 + */ 473 + CF_EXPORT 474 + const ODRecordType kODRecordTypePresetComputerGroups; 475 + 476 + /*! 477 + @const kODRecordTypePresetComputerLists 478 + @abstract The computer list record type used for presets in record creation. 479 + @discussion The computer list record type used for presets in record creation. 480 + */ 481 + CF_EXPORT 482 + const ODRecordType kODRecordTypePresetComputerLists; 483 + 484 + /*! 485 + @const kODRecordTypePresetGroups 486 + @abstract The group record type used for presets in record creation. 487 + @discussion The group record type used for presets in record creation. 488 + */ 489 + CF_EXPORT 490 + const ODRecordType kODRecordTypePresetGroups; 491 + 492 + /*! 493 + @const kODRecordTypePresetUsers 494 + @abstract The user record type used for presets in record creation. 495 + @discussion The user record type used for presets in record creation. 496 + */ 497 + CF_EXPORT 498 + const ODRecordType kODRecordTypePresetUsers; 499 + 500 + /*! 501 + @const kODRecordTypePrintService 502 + @abstract Identifies print service records. 503 + @discussion Identifies print service records. 504 + */ 505 + CF_EXPORT 506 + const ODRecordType kODRecordTypePrintService; 507 + 508 + /*! 509 + @const kODRecordTypePrintServiceUser 510 + @abstract Record in the local node for storing quota usage for a user. 511 + @discussion Record in the local node for storing quota usage for a user. 512 + */ 513 + CF_EXPORT 514 + const ODRecordType kODRecordTypePrintServiceUser; 515 + 516 + /*! 517 + @const kODRecordTypePrinters 518 + @abstract Identifies printer records. 519 + @discussion Identifies printer records. 520 + */ 521 + CF_EXPORT 522 + const ODRecordType kODRecordTypePrinters; 523 + 524 + /*! 525 + @const kODRecordTypeProtocols 526 + @abstract Identifies protocol records. 527 + @discussion Identifies protocol records. 528 + */ 529 + CF_EXPORT 530 + const ODRecordType kODRecordTypeProtocols; 531 + 532 + /*! 533 + @const kODRecordTypeQTSServer 534 + @abstract Identifies quicktime streaming server records. 535 + @discussion Identifies quicktime streaming server records. 536 + */ 537 + CF_EXPORT 538 + const ODRecordType kODRecordTypeQTSServer; 539 + 540 + /*! 541 + @const kODRecordTypeQueryInformation 542 + @abstract Special query information record 543 + @discussion Specifically to return query information inline such as skipped nodes 544 + */ 545 + CF_EXPORT 546 + const ODRecordType kODRecordTypeQueryInformation; 547 + 548 + /*! 549 + @const kODRecordTypeRecordTypes 550 + @abstract Identifies records that represent each possible record type. 551 + @discussion Identifies records that represent each possible record type. 552 + */ 553 + CF_EXPORT 554 + const ODRecordType kODRecordTypeRecordTypes; 555 + 556 + /*! 557 + @const kODRecordTypeResources 558 + @abstract Identifies resources used in group services. 559 + @discussion Identifies resources used in group services. 560 + */ 561 + CF_EXPORT 562 + const ODRecordType kODRecordTypeResources; 563 + 564 + /*! 565 + @const kODRecordTypeRPC 566 + @abstract Identifies remote procedure call records. 567 + @discussion Identifies remote procedure call records. 568 + */ 569 + CF_EXPORT 570 + const ODRecordType kODRecordTypeRPC; 571 + 572 + /*! 573 + @const kODRecordTypeSMBServer 574 + @abstract Identifies SMB server records. 575 + @discussion Identifies SMB server records. 576 + */ 577 + CF_EXPORT 578 + const ODRecordType kODRecordTypeSMBServer; 579 + 580 + /*! 581 + @const kODRecordTypeServer 582 + @abstract Identifies generic server records. 583 + @discussion Identifies generic server records. 584 + */ 585 + CF_EXPORT 586 + const ODRecordType kODRecordTypeServer; 587 + 588 + /*! 589 + @const kODRecordTypeServices 590 + @abstract Identifies directory based service records. 591 + @discussion Identifies directory based service records. 592 + */ 593 + CF_EXPORT 594 + const ODRecordType kODRecordTypeServices; 595 + 596 + /*! 597 + @const kODRecordTypeSharePoints 598 + @abstract Share point record type. 599 + @discussion Share point record type. 600 + */ 601 + CF_EXPORT 602 + const ODRecordType kODRecordTypeSharePoints; 603 + 604 + /*! 605 + @const kODRecordTypeUsers 606 + @abstract Identifies user records. 607 + @discussion Identifies user records. 608 + */ 609 + CF_EXPORT 610 + const ODRecordType kODRecordTypeUsers; 611 + 612 + /*! 613 + @const kODRecordTypeWebServer 614 + @abstract Identifies web server records. 615 + @discussion Identifies web server records. 616 + */ 617 + CF_EXPORT 618 + const ODRecordType kODRecordTypeWebServer; 619 + 620 + #pragma mark Attribute Types 621 + 622 + /*! 623 + @const kODAttributeTypeAllAttributes 624 + @abstract Used in requesting all attribute types in a search. 625 + @discussion Used in requesting all attribute types in a search. 626 + */ 627 + CF_EXPORT 628 + const ODAttributeType kODAttributeTypeAllAttributes; 629 + 630 + /*! 631 + @const kODAttributeTypeStandardOnly 632 + @abstract Used in requesting all standard attribute types in a query. 633 + @discussion Used in requesting all standard attribute types in a query. 634 + */ 635 + CF_EXPORT 636 + const ODAttributeType kODAttributeTypeStandardOnly; 637 + 638 + /*! 639 + @const kODAttributeTypeNativeOnly 640 + @abstract Used in requesting all native attribute types in a search. 641 + @discussion Used in requesting all native attribute types in a search. 642 + */ 643 + CF_EXPORT 644 + const ODAttributeType kODAttributeTypeNativeOnly; 645 + 646 + /*! 647 + @const kODAttributeTypeMetaAmbiguousName 648 + @abstract Used to disambiguate a provided name. 649 + @discussion Searches a configured list of attributes; by default: RecordName, FullName, EMailAddress. 650 + */ 651 + CF_EXPORT 652 + const ODAttributeType kODAttributeTypeMetaAmbiguousName; 653 + 654 + /*! 655 + @const kODAttributeTypeMetaAugmentedAttributes 656 + @abstract Attributes that have been augmented. 657 + @discussion Attributes that have been augmented. 658 + */ 659 + CF_EXPORT 660 + const ODAttributeType kODAttributeTypeMetaAugmentedAttributes; 661 + 662 + /*! 663 + @const kODAttributeTypeMetaRecordName 664 + @abstract Native record name. 665 + @discussion Native record name, e.g. LDAP DN 666 + */ 667 + CF_EXPORT 668 + const ODAttributeType kODAttributeTypeMetaRecordName; 669 + 670 + /*! 671 + @const kODAttributeTypeAdminLimits 672 + @abstract XML plist indicating what an admin user can edit. 673 + @discussion XML plist indicating what an admin user can edit. Found in kODRecordTypeUsers records. 674 + */ 675 + CF_EXPORT 676 + const ODAttributeType kODAttributeTypeAdminLimits; 677 + 678 + /*! 679 + @const kODAttributeTypeAltSecurityIdentities 680 + @abstract Used to store alternate identities for the record 681 + @discussion Used to store alternate identities for the record. Values will have standardized form as 682 + specified by Microsoft LDAP schema (1.2.840.113556.1.4.867). 683 + 684 + Kerberos:user\@REALM 685 + */ 686 + CF_EXPORT 687 + const ODAttributeType kODAttributeTypeAltSecurityIdentities __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 688 + 689 + /*! 690 + @const kODAttributeTypeAuthenticationHint 691 + @abstract Used to identify the authentication hint phrase. 692 + @discussion Used to identify the authentication hint phrase. 693 + */ 694 + CF_EXPORT 695 + const ODAttributeType kODAttributeTypeAuthenticationHint; 696 + 697 + /*! 698 + @const kODAttributeTypeAllTypes 699 + @abstract Used to indicated recommended attribute types for a record type in the Config node. 700 + @discussion Used to indicated recommended attribute types for a record type in the Config node. 701 + */ 702 + CF_EXPORT 703 + const ODAttributeType kODAttributeTypeAllTypes; 704 + 705 + /*! 706 + @const kODAttributeTypeAuthorityRevocationList 707 + @abstract Attribute containing the binary of the authority revocation list 708 + @discussion Attribute containing the binary of the authority revocation list. 709 + A certificate revocation list that defines certificate authority certificates 710 + which are no longer trusted. No user certificates are included in this list. 711 + Usually found in kODRecordTypeCertificateAuthorities records. 712 + */ 713 + CF_EXPORT 714 + const ODAttributeType kODAttributeTypeAuthorityRevocationList; 715 + 716 + /*! 717 + @const kODAttributeTypeBirthday 718 + @abstract Single-valued attribute that defines the user's birthday. 719 + @discussion Single-valued attribute that defines the user's birthday. 720 + Format is x.208 standard YYYYMMDDHHMMSSZ which we will require as GMT time. 721 + */ 722 + CF_EXPORT 723 + const ODAttributeType kODAttributeTypeBirthday; 724 + 725 + /*! 726 + @const kODAttributeTypeCACertificate 727 + @abstract Attribute containing the binary of the certificate of a certificate authority. 728 + @discussion Attribute containing the binary of the certificate of a certificate authority. 729 + Its corresponding private key is used to sign certificates. 730 + Usually found in kODRecordTypeCertificateAuthority records. 731 + */ 732 + CF_EXPORT 733 + const ODAttributeType kODAttributeTypeCACertificate; 734 + 735 + /*! 736 + @const kODAttributeTypeCapacity 737 + @abstract Attribute type for the capacity of a resource. 738 + @discussion Attribute type for the capacity of a resource. 739 + found in resource records (kODRecordTypeResources). 740 + Example: 50 741 + */ 742 + CF_EXPORT 743 + const ODAttributeType kODAttributeTypeCapacity; 744 + 745 + /*! 746 + @const kODAttributeTypeCertificateRevocationList 747 + @abstract Attribute containing the binary of the certificate revocation list. 748 + @discussion Attribute containing the binary of the certificate revocation list. 749 + This is a list of certificates which are no longer trusted. 750 + Usually found in kODRecordTypeCertificateAuthority records. 751 + */ 752 + CF_EXPORT 753 + const ODAttributeType kODAttributeTypeCertificateRevocationList; 754 + 755 + /*! 756 + @const kODAttributeTypeComment 757 + @abstract Attribute used for unformatted comment. 758 + @discussion Attribute used for unformatted comment. 759 + */ 760 + CF_EXPORT 761 + const ODAttributeType kODAttributeTypeComment; 762 + 763 + /*! 764 + @const kODAttributeTypeContactGUID 765 + @abstract Attribute type for the contact GUID of a group. 766 + @discussion Attribute type for the contact GUID of a group. 767 + Usually found in group records (kODRecordTypeGroups) 768 + */ 769 + CF_EXPORT 770 + const ODAttributeType kODAttributeTypeContactGUID; 771 + 772 + /*! 773 + @const kODAttributeTypeContactPerson 774 + @abstract Attribute type for the contact person of the machine. 775 + @discussion Attribute type for the contact person of the machine. 776 + Found in host or machine records. 777 + */ 778 + CF_EXPORT 779 + const ODAttributeType kODAttributeTypeContactPerson; 780 + 781 + /*! 782 + @const kODAttributeTypeCreationTimestamp 783 + @abstract Attribute showing date/time of record creation. 784 + @discussion Attribute showing date/time of record creation. 785 + Format is x.208 standard YYYYMMDDHHMMSSZ which should be GMT time. 786 + */ 787 + CF_EXPORT 788 + const ODAttributeType kODAttributeTypeCreationTimestamp; 789 + 790 + /*! 791 + @const kODAttributeTypeCrossCertificatePair 792 + @abstract Attribute containing the binary of a pair of certificates which 793 + verify each other. 794 + @discussion Attribute containing the binary of a pair of certificates which 795 + verify each other. Both certificates have the same level of authority. 796 + Usually found in kODRecordTypeCertificateAuthority records. 797 + */ 798 + CF_EXPORT 799 + const ODAttributeType kODAttributeTypeCrossCertificatePair; 800 + 801 + /*! 802 + @const kODAttributeTypeDataStamp 803 + @abstract Attribute for checksum/meta data 804 + @discussion Attribute for checksum/meta data 805 + */ 806 + CF_EXPORT 807 + const ODAttributeType kODAttributeTypeDataStamp; 808 + 809 + /*! 810 + @const kODAttributeTypeFullName 811 + @abstract Full name of a record 812 + @discussion Full name of a record (e.g., "John Doe", "John Doe's Computer") 813 + */ 814 + CF_EXPORT 815 + const ODAttributeType kODAttributeTypeFullName; 816 + 817 + /*! 818 + @const kODAttributeTypeDNSDomain 819 + @abstract DNS Resolver domain attribute. 820 + @discussion DNS Resolver domain attribute. 821 + */ 822 + CF_EXPORT 823 + const ODAttributeType kODAttributeTypeDNSDomain; 824 + 825 + /*! 826 + @const kODAttributeTypeDNSNameServer 827 + @abstract DNS Resolver nameserver attribute. 828 + @discussion DNS Resolver nameserver attribute. 829 + */ 830 + CF_EXPORT 831 + const ODAttributeType kODAttributeTypeDNSNameServer; 832 + 833 + /*! 834 + @const kODAttributeTypeENetAddress 835 + @abstract Attribute for hardware Ethernet address (MAC address). 836 + @discussion Attribute for hardware Ethernet address (MAC address). 837 + Found in computer records (kODRecordTypeComputers). 838 + */ 839 + CF_EXPORT 840 + const ODAttributeType kODAttributeTypeENetAddress; 841 + 842 + /*! 843 + @const kODAttributeTypeExpire 844 + @abstract Used for expiration date or time depending on association. 845 + @discussion Used for expiration date or time depending on association. 846 + */ 847 + CF_EXPORT 848 + const ODAttributeType kODAttributeTypeExpire; 849 + 850 + /*! 851 + @const kODAttributeTypeFirstName 852 + @abstract Used for first name of user or person record. 853 + @discussion Used for first name of user or person record. 854 + */ 855 + CF_EXPORT 856 + const ODAttributeType kODAttributeTypeFirstName; 857 + 858 + /*! 859 + @const kODAttributeTypeGUID 860 + @abstract Used for 36 character (128 bit) unique ID. 861 + @discussion Used for 36 character (128 bit) unique ID. An example value is 862 + "A579E95E-CDFE-4EBC-B7E7-F2158562170F". The standard format contains 863 + 32 uppercase hex characters and four hyphen characters. 864 + */ 865 + CF_EXPORT 866 + const ODAttributeType kODAttributeTypeGUID; 867 + 868 + /*! 869 + @const kODAttributeTypeHardwareUUID 870 + @abstract Used to store hardware UUID in string form 871 + @discussion Used to store hardware UUID in string form for a record. Typically found in 872 + kODRecordTypeComputers. 873 + */ 874 + CF_EXPORT 875 + const ODAttributeType kODAttributeTypeHardwareUUID __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 876 + 877 + /*! 878 + @const kODAttributeTypeHomeDirectoryQuota 879 + @abstract Represents the allowed usage for a user's home directory in bytes. 880 + @discussion Represents the allowed usage for a user's home directory in bytes. 881 + Found in user records (kODRecordTypeUsers). 882 + */ 883 + CF_EXPORT 884 + const ODAttributeType kODAttributeTypeHomeDirectoryQuota; 885 + 886 + /*! 887 + @const kODAttributeTypeHomeDirectorySoftQuota 888 + @abstract Used to define home directory size limit in bytes when user is notified 889 + that the hard limit is approaching. 890 + @discussion Used to define home directory size limit in bytes when user is notified 891 + that the hard limit is approaching. 892 + */ 893 + CF_EXPORT 894 + const ODAttributeType kODAttributeTypeHomeDirectorySoftQuota; 895 + 896 + /*! 897 + @const kODAttributeTypeHomeLocOwner 898 + @abstract Represents the owner of a workgroup's shared home directory. 899 + @discussion Represents the owner of a workgroup's shared home directory. 900 + Typically found in kODRecordTypeGroups records. 901 + */ 902 + CF_EXPORT 903 + const ODAttributeType kODAttributeTypeHomeLocOwner; 904 + 905 + /*! 906 + @const kODAttributeTypeInternetAlias 907 + @abstract Used to track internet alias. 908 + @discussion Used to track internet alias. 909 + */ 910 + CF_EXPORT 911 + const ODAttributeType kODAttributeTypeInternetAlias; 912 + 913 + /*! 914 + @const kODAttributeTypeKDCConfigData 915 + @abstract Contents of the kdc.conf file. 916 + @discussion Contents of the kdc.conf file. 917 + */ 918 + CF_EXPORT 919 + const ODAttributeType kODAttributeTypeKDCConfigData; 920 + 921 + /*! 922 + @const kODAttributeTypeKerberosServices 923 + @abstract This is used to store the principals in host records (i.e., "host", "vnc", etc.) 924 + @discussion This is used to store the principals in host records (i.e., "host", "vnc", etc.) 925 + */ 926 + CF_EXPORT 927 + const ODAttributeType kODAttributeTypeKerberosServices __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 928 + 929 + /*! 930 + @const kODAttributeTypeLastName 931 + @abstract Used for the last name of user or person record. 932 + @discussion Used for the last name of user or person record. 933 + */ 934 + CF_EXPORT 935 + const ODAttributeType kODAttributeTypeLastName; 936 + 937 + /*! 938 + @const kODAttributeTypeLDAPSearchBaseSuffix 939 + @abstract Search base suffix for a LDAP server. 940 + @discussion Search base suffix for a LDAP server. 941 + */ 942 + CF_EXPORT 943 + const ODAttributeType kODAttributeTypeLDAPSearchBaseSuffix; 944 + 945 + /*! 946 + @const kODAttributeTypeLocation 947 + @abstract Represents the location a service is available from (usually domain name) 948 + @discussion Represents the location a service is available from (usually domain name). 949 + Typically found in service record types including kODRecordTypeAFPServer, 950 + kODRecordTypeLDAPServer, and kODRecordTypeWebServer. 951 + */ 952 + CF_EXPORT 953 + const ODAttributeType kODAttributeTypeLocation; 954 + 955 + /*! 956 + @const kODAttributeTypeMapGUID 957 + @abstract Represents the GUID for a record's map 958 + @discussion Represents the GUID for a record's map. 959 + */ 960 + CF_EXPORT 961 + const ODAttributeType kODAttributeTypeMapGUID; 962 + 963 + /*! 964 + @const kODAttributeTypeMCXFlags 965 + @abstract Used by ManagedClient 966 + @discussion Used by ManagedClient. 967 + */ 968 + CF_EXPORT 969 + const ODAttributeType kODAttributeTypeMCXFlags; 970 + 971 + /*! 972 + @const kODAttributeTypeMCXSettings 973 + @abstract Used by ManagedClient 974 + @discussion Used by ManagedClient. 975 + */ 976 + CF_EXPORT 977 + const ODAttributeType kODAttributeTypeMCXSettings; 978 + 979 + /*! 980 + @const kODAttributeTypeMailAttribute 981 + @abstract Holds the mail account config data 982 + @discussion Holds the mail account config data. 983 + */ 984 + CF_EXPORT 985 + const ODAttributeType kODAttributeTypeMailAttribute; 986 + 987 + /*! 988 + @const kODAttributeTypeMetaAutomountMap 989 + @abstract Used to query for kODRecordTypeAutomount entries 990 + @discussion Used to query for kODRecordTypeAutomount entries associated with a specific 991 + kODRecordTypeAutomountMap. 992 + */ 993 + CF_EXPORT 994 + const ODAttributeType kODAttributeTypeMetaAutomountMap; 995 + 996 + /*! 997 + @const kODAttributeTypeMiddleName 998 + @abstract Used for the middle name of user or person record. 999 + @discussion Used for the middle name of user or person record. 1000 + */ 1001 + CF_EXPORT 1002 + const ODAttributeType kODAttributeTypeMiddleName; 1003 + 1004 + /*! 1005 + @const kODAttributeTypeModificationTimestamp 1006 + @abstract Attribute showing date/time of record modification. 1007 + @discussion Attribute showing date/time of record modification. 1008 + Format is x.208 standard YYYYMMDDHHMMSSZ which is required as GMT time. 1009 + */ 1010 + CF_EXPORT 1011 + const ODAttributeType kODAttributeTypeModificationTimestamp; 1012 + 1013 + /*! 1014 + @const kODAttributeTypeNFSHomeDirectory 1015 + @abstract Defines a user's home directory mount point on the local machine. 1016 + @discussion Defines a user's home directory mount point on the local machine. 1017 + */ 1018 + CF_EXPORT 1019 + const ODAttributeType kODAttributeTypeNFSHomeDirectory; 1020 + 1021 + /*! 1022 + @const kODAttributeTypeNote 1023 + @abstract Note attribute. 1024 + @discussion Note attribute. 1025 + */ 1026 + CF_EXPORT 1027 + const ODAttributeType kODAttributeTypeNote; 1028 + 1029 + /*! 1030 + @const kODAttributeTypeOperatingSystem 1031 + @abstract Returns the operating system type where the daemon is running 1032 + @discussion Returns the operating system type where the daemon is running, 1033 + e.g., Mac OS X or Mac OS X Server 1034 + */ 1035 + CF_EXPORT 1036 + const ODAttributeType kODAttributeTypeOperatingSystem __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 1037 + 1038 + /*! 1039 + @const kODAttributeTypeOperatingSystemVersion 1040 + @abstract Returns the operating system version where the daemon is running 1041 + @discussion Returns the operating system version where the daemon is running, 1042 + e.g., 10.6 1043 + */ 1044 + CF_EXPORT 1045 + const ODAttributeType kODAttributeTypeOperatingSystemVersion __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA); 1046 + 1047 + /*! 1048 + @const kODAttributeTypeOwner 1049 + @abstract Attribute type for the owner of a record. 1050 + @discussion Attribute type for the owner of a record. 1051 + Typically the value is a LDAP distinguished name. 1052 + */ 1053 + CF_EXPORT 1054 + const ODAttributeType kODAttributeTypeOwner; 1055 + 1056 + /*! 1057 + @const kODAttributeTypeOwnerGUID 1058 + @abstract Attribute type for the owner GUID of a group. 1059 + @discussion Attribute type for the owner GUID of a group. 1060 + Found in group records (kODRecordTypeGroups). 1061 + */ 1062 + CF_EXPORT 1063 + const ODAttributeType kODAttributeTypeOwnerGUID; 1064 + 1065 + /*! 1066 + @const kODAttributeTypePassword 1067 + @abstract Holds the password or credential value. 1068 + @discussion Holds the password or credential value. 1069 + */ 1070 + CF_EXPORT 1071 + const ODAttributeType kODAttributeTypePassword; 1072 + 1073 + /*! 1074 + @const kODAttributeTypePasswordPlus 1075 + @abstract Holds marker data to indicate possible authentication redirection. 1076 + @discussion Holds marker data to indicate possible authentication redirection. 1077 + */ 1078 + CF_EXPORT 1079 + const ODAttributeType kODAttributeTypePasswordPlus; 1080 + 1081 + /*! 1082 + @const kODAttributeTypePasswordPolicyOptions 1083 + @abstract Collection of password policy options in single attribute. 1084 + @discussion Collection of password policy options in single attribute. 1085 + Used in user presets record. 1086 + */ 1087 + CF_EXPORT 1088 + const ODAttributeType kODAttributeTypePasswordPolicyOptions; 1089 + 1090 + /*! 1091 + @const kODAttributeTypePasswordServerList 1092 + @abstract Represents the attribute for storing the password server's replication information. 1093 + @discussion Represents the attribute for storing the password server's replication information. 1094 + */ 1095 + CF_EXPORT 1096 + const ODAttributeType kODAttributeTypePasswordServerList; 1097 + 1098 + /*! 1099 + @const kODAttributeTypePasswordServerLocation 1100 + @abstract Specifies the IP address or domain name of the Password Server associated 1101 + with a given directory node. 1102 + @discussion Specifies the IP address or domain name of the Password Server associated 1103 + with a given directory node. Found in a config record named PasswordServer. 1104 + */ 1105 + CF_EXPORT 1106 + const ODAttributeType kODAttributeTypePasswordServerLocation; 1107 + 1108 + /*! 1109 + @const kODAttributeTypePicture 1110 + @abstract Represents the path of the picture for each user displayed in the login window. 1111 + @discussion Represents the path of the picture for each user displayed in the login window. 1112 + Found in user records (kODRecordTypeUsers). 1113 + */ 1114 + CF_EXPORT 1115 + const ODAttributeType kODAttributeTypePicture; 1116 + 1117 + /*! 1118 + @const kODAttributeTypePort 1119 + @abstract Represents the port number a service is available on. 1120 + @discussion Represents the port number a service is available on. 1121 + Typically found in service record types including kODRecordTypeAFPServer, 1122 + kODRecordTypeLDAPServer, and kODRecordTypeWebServer. 1123 + */ 1124 + CF_EXPORT 1125 + const ODAttributeType kODAttributeTypePort; 1126 + 1127 + /*! 1128 + @const kODAttributeTypePresetUserIsAdmin 1129 + @abstract Flag to indicate whether users created from this preset are administrators 1130 + by default. 1131 + @discussion Flag to indicate whether users created from this preset are administrators 1132 + by default. Found in kODRecordTypePresetUsers records. 1133 + */ 1134 + CF_EXPORT 1135 + const ODAttributeType kODAttributeTypePresetUserIsAdmin; 1136 + 1137 + /*! 1138 + @const kODAttributeTypePrimaryComputerGUID 1139 + @abstract An attribute that defines a primary computer of the computer group. 1140 + @discussion An attribute that defines a primary computer of the computer group. 1141 + Added to computer group record type (kODRecordTypeComputerGroups) 1142 + */ 1143 + CF_EXPORT 1144 + const ODAttributeType kODAttributeTypePrimaryComputerGUID; 1145 + 1146 + /*! 1147 + @const kODAttributeTypePrimaryComputerList 1148 + @abstract The GUID of the computer list with which this computer record is associated. 1149 + @discussion The GUID of the computer list with which this computer record is associated. 1150 + */ 1151 + CF_EXPORT 1152 + const ODAttributeType kODAttributeTypePrimaryComputerList; 1153 + 1154 + /*! 1155 + @const kODAttributeTypePrimaryGroupID 1156 + @abstract This is the 32 bit unique ID that represents the primary group 1157 + a user is part of, or the ID of a group. 1158 + @discussion This is the 32 bit unique ID that represents the primary group 1159 + a user is part of, or the ID of a group. Format is a signed 32 bit integer 1160 + represented as a string. 1161 + */ 1162 + CF_EXPORT 1163 + const ODAttributeType kODAttributeTypePrimaryGroupID; 1164 + 1165 + /*! 1166 + @const kODAttributeTypePrinter1284DeviceID 1167 + @abstract Attribute that defines the IEEE 1284 DeviceID of a printer. 1168 + @discussion Attribute that defines the IEEE 1284 DeviceID of a printer. 1169 + This is used when configuring a printer. 1170 + */ 1171 + CF_EXPORT 1172 + const ODAttributeType kODAttributeTypePrinter1284DeviceID; 1173 + 1174 + /*! 1175 + @const kODAttributeTypePrinterLPRHost 1176 + @abstract Standard attribute type for kODRecordTypePrinters. 1177 + @discussion Standard attribute type for kODRecordTypePrinters. 1178 + */ 1179 + CF_EXPORT 1180 + const ODAttributeType kODAttributeTypePrinterLPRHost; 1181 + 1182 + /*! 1183 + @const kODAttributeTypePrinterLPRQueue 1184 + @abstract Standard attribute type for kODRecordTypePrinters. 1185 + @discussion Standard attribute type for kODRecordTypePrinters. 1186 + */ 1187 + CF_EXPORT 1188 + const ODAttributeType kODAttributeTypePrinterLPRQueue; 1189 + 1190 + /*! 1191 + @const kODAttributeTypePrinterMakeAndModel 1192 + @abstract Attribute for definition of the Printer Make and Model. 1193 + @discussion Attribute for definition of the Printer Make and Model. An example 1194 + value would be "HP LaserJet 2200". This would be used to determine the proper PPD 1195 + file to be used when configuring a printer from the Directory. This attribute 1196 + is based on the IPP Printing Specification RFC and IETF IPP-LDAP Printer Record. 1197 + */ 1198 + CF_EXPORT 1199 + const ODAttributeType kODAttributeTypePrinterMakeAndModel; 1200 + 1201 + /*! 1202 + @const kODAttributeTypePrinterType 1203 + @abstract Standard attribute type for kODRecordTypePrinters. 1204 + @discussion Standard attribute type for kODRecordTypePrinters. 1205 + */ 1206 + CF_EXPORT 1207 + const ODAttributeType kODAttributeTypePrinterType; 1208 + 1209 + /*! 1210 + @const kODAttributeTypePrinterURI 1211 + @abstract Attribute that defines the URI of a printer "ipp://address" or 1212 + "smb://server/queue". 1213 + @discussion Attribute that defines the URI of a printer "ipp://address" or 1214 + "smb://server/queue". This is used when configuring a printer. This attribute 1215 + is based on the IPP Printing Specification RFC and IETF IPP-LDAP Printer Record. 1216 + */ 1217 + CF_EXPORT 1218 + const ODAttributeType kODAttributeTypePrinterURI; 1219 + 1220 + /*! 1221 + @const kODAttributeTypePrinterXRISupported 1222 + @abstract Attribute that defines additional URIs supported by a printer. 1223 + @discussion attribute that defines additional URIs supported by a printer. 1224 + This is used when configuring a printer. This attribute is based on the IPP 1225 + Printing Specification RFC and IETF IPP-LDAP Printer Record. 1226 + */ 1227 + CF_EXPORT 1228 + const ODAttributeType kODAttributeTypePrinterXRISupported; 1229 + 1230 + /*! 1231 + @const kODAttributeTypePrintServiceInfoText 1232 + @abstract Standard attribute type for kODRecordTypePrinters. 1233 + @discussion Standard attribute type for kODRecordTypePrinters. 1234 + */ 1235 + CF_EXPORT 1236 + const ODAttributeType kODAttributeTypePrintServiceInfoText; 1237 + 1238 + /*! 1239 + @const kODAttributeTypePrintServiceInfoXML 1240 + @abstract Standard attribute type for kODRecordTypePrinters. 1241 + @discussion Standard attribute type for kODRecordTypePrinters. 1242 + */ 1243 + CF_EXPORT 1244 + const ODAttributeType kODAttributeTypePrintServiceInfoXML; 1245 + 1246 + /*! 1247 + @const kODAttributeTypePrintServiceUserData 1248 + @abstract Attribute for print quota configuration or statistics (XML data). 1249 + @discussion Attribute for print quota configuration or statistics (XML data). 1250 + Found in user records (kODRecordTypeUsers) or print service 1251 + statistics records (kODRecordTypePrintServiceUser). 1252 + */ 1253 + CF_EXPORT 1254 + const ODAttributeType kODAttributeTypePrintServiceUserData; 1255 + 1256 + /*! 1257 + @const kODAttributeTypeRealUserID 1258 + @abstract Used by Managed Client. 1259 + @discussion Used by Managed Client 1260 + */ 1261 + CF_EXPORT 1262 + const ODAttributeType kODAttributeTypeRealUserID; 1263 + 1264 + /*! 1265 + @const kODAttributeTypeRelativeDNPrefix 1266 + @abstract Used to map the first native LDAP attribute type required in the building of the 1267 + Relative Distinguished Name for LDAP record creation. 1268 + @discussion Used to map the first native LDAP attribute type required in the building of the 1269 + Relative Distinguished Name for LDAP record creation. 1270 + */ 1271 + CF_EXPORT 1272 + const ODAttributeType kODAttributeTypeRelativeDNPrefix; 1273 + 1274 + /*! 1275 + @const kODAttributeTypeSMBAcctFlags 1276 + @abstract Account control flag. 1277 + @discussion Account control flag. 1278 + */ 1279 + CF_EXPORT 1280 + const ODAttributeType kODAttributeTypeSMBAcctFlags; 1281 + 1282 + /*! 1283 + @const kODAttributeTypeSMBGroupRID 1284 + @abstract Constant for supporting PDC SMB interaction with DirectoryService. 1285 + @discussion Constant for supporting PDC SMB interaction with DirectoryService. 1286 + */ 1287 + CF_EXPORT 1288 + const ODAttributeType kODAttributeTypeSMBGroupRID; 1289 + 1290 + /*! 1291 + @const kODAttributeTypeSMBHome 1292 + @abstract UNC address of Windows homedirectory mount point (\\server\\sharepoint). 1293 + @discussion UNC address of Windows homedirectory mount point (\\server\\sharepoint). 1294 + */ 1295 + CF_EXPORT 1296 + const ODAttributeType kODAttributeTypeSMBHome; 1297 + 1298 + /*! 1299 + @const kODAttributeTypeSMBHomeDrive 1300 + @abstract Drive letter for homedirectory mount point. 1301 + @discussion Drive letter for homedirectory mount point. 1302 + */ 1303 + CF_EXPORT 1304 + const ODAttributeType kODAttributeTypeSMBHomeDrive; 1305 + 1306 + /*! 1307 + @const kODAttributeTypeSMBKickoffTime 1308 + @abstract Attribute in support of SMB interaction. 1309 + @discussion Attribute in support of SMB interaction. 1310 + */ 1311 + CF_EXPORT 1312 + const ODAttributeType kODAttributeTypeSMBKickoffTime; 1313 + 1314 + /*! 1315 + @const kODAttributeTypeSMBLogoffTime 1316 + @abstract Attribute in support of SMB interaction. 1317 + @discussion Attribute in support of SMB interaction. 1318 + */ 1319 + CF_EXPORT 1320 + const ODAttributeType kODAttributeTypeSMBLogoffTime; 1321 + 1322 + /*! 1323 + @const kODAttributeTypeSMBLogonTime 1324 + @abstract Attribute in support of SMB interaction. 1325 + @discussion Attribute in support of SMB interaction. 1326 + */ 1327 + CF_EXPORT 1328 + const ODAttributeType kODAttributeTypeSMBLogonTime; 1329 + 1330 + /*! 1331 + @const kODAttributeTypeSMBPrimaryGroupSID 1332 + @abstract SMB Primary Group Security ID, stored as a string attribute of 1333 + up to 64 bytes. 1334 + @discussion SMB Primary Group Security ID, stored as a string attribute of 1335 + up to 64 bytes. Found in user, group, and computer records 1336 + (kODRecordTypeUsers, kODRecordTypeGroups, kODRecordTypeComputers). 1337 + */ 1338 + CF_EXPORT 1339 + const ODAttributeType kODAttributeTypeSMBPrimaryGroupSID; 1340 + 1341 + /*! 1342 + @const kODAttributeTypeSMBPWDLastSet 1343 + @abstract Attribute in support of SMB interaction. 1344 + @discussion Attribute in support of SMB interaction. 1345 + */ 1346 + CF_EXPORT 1347 + const ODAttributeType kODAttributeTypeSMBPWDLastSet; 1348 + 1349 + /*! 1350 + @const kODAttributeTypeSMBProfilePath 1351 + @abstract Desktop management info (dock, desktop links, etc). 1352 + @discussion Desktop management info (dock, desktop links, etc). 1353 + */ 1354 + CF_EXPORT 1355 + const ODAttributeType kODAttributeTypeSMBProfilePath; 1356 + 1357 + /*! 1358 + @const kODAttributeTypeSMBRID 1359 + @abstract Attribute in support of SMB interaction. 1360 + @discussion Attribute in support of SMB interaction. 1361 + */ 1362 + CF_EXPORT 1363 + const ODAttributeType kODAttributeTypeSMBRID; 1364 + 1365 + /*! 1366 + @const kODAttributeTypeSMBScriptPath 1367 + @abstract Login script path. 1368 + @discussion Login script path. 1369 + */ 1370 + CF_EXPORT 1371 + const ODAttributeType kODAttributeTypeSMBScriptPath; 1372 + 1373 + /*! 1374 + @const kODAttributeTypeSMBSID 1375 + @abstract SMB Security ID, stored as a string attribute of up to 64 bytes. 1376 + @discussion SMB Security ID, stored as a string attribute of up to 64 bytes. 1377 + Found in user, group, and computer records (kODRecordTypeUsers, 1378 + kODRecordTypeGroups, kODRecordTypeComputers). 1379 + */ 1380 + CF_EXPORT 1381 + const ODAttributeType kODAttributeTypeSMBSID; 1382 + 1383 + /*! 1384 + @const kODAttributeTypeSMBUserWorkstations 1385 + @abstract List of workstations user can login from (machine account names). 1386 + @discussion List of workstations user can login from (machine account names). 1387 + */ 1388 + CF_EXPORT 1389 + const ODAttributeType kODAttributeTypeSMBUserWorkstations; 1390 + 1391 + /*! 1392 + @const kODAttributeTypeServiceType 1393 + @abstract Represents the service type for the service. This is the raw service type of the 1394 + service. 1395 + @discussion Represents the service type for the service. This is the raw service type of the 1396 + service. For example a service record type of kODRecordTypeWebServer 1397 + might have a service type of "http" or "https". 1398 + */ 1399 + CF_EXPORT 1400 + const ODAttributeType kODAttributeTypeServiceType; 1401 + 1402 + /*! 1403 + @const kODAttributeTypeSetupAdvertising 1404 + @abstract Used for Setup Assistant automatic population. 1405 + @discussion Used for Setup Assistant automatic population. 1406 + */ 1407 + CF_EXPORT 1408 + const ODAttributeType kODAttributeTypeSetupAdvertising; 1409 + 1410 + /*! 1411 + @const kODAttributeTypeSetupAutoRegister 1412 + @abstract Used for Setup Assistant automatic population. 1413 + @discussion Used for Setup Assistant automatic population. 1414 + */ 1415 + CF_EXPORT 1416 + const ODAttributeType kODAttributeTypeSetupAutoRegister; 1417 + 1418 + /*! 1419 + @const kODAttributeTypeSetupLocation 1420 + @abstract Used for Setup Assistant automatic population. 1421 + @discussion Used for Setup Assistant automatic population. 1422 + */ 1423 + CF_EXPORT 1424 + const ODAttributeType kODAttributeTypeSetupLocation; 1425 + 1426 + /*! 1427 + @const kODAttributeTypeSetupOccupation 1428 + @abstract Used for Setup Assistant automatic population. 1429 + @discussion Used for Setup Assistant automatic population. 1430 + */ 1431 + CF_EXPORT 1432 + const ODAttributeType kODAttributeTypeSetupOccupation; 1433 + 1434 + /*! 1435 + @const kODAttributeTypeTimeToLive 1436 + @abstract Attribute recommending how long to cache the record's attribute values. 1437 + @discussion Attribute recommending how long to cache the record's attribute values. 1438 + Format is an unsigned 32 bit representing seconds. ie. 300 is 5 minutes. 1439 + */ 1440 + CF_EXPORT 1441 + const ODAttributeType kODAttributeTypeTimeToLive; 1442 + 1443 + /*! 1444 + @const kODAttributeTypeTrustInformation 1445 + @abstract Used to describe a node's trust information. 1446 + @discussion Used to describe a node's trust information. 1447 + */ 1448 + CF_EXPORT 1449 + const ODAttributeType kODAttributeTypeTrustInformation; 1450 + 1451 + /*! 1452 + @const kODAttributeTypeUniqueID 1453 + @abstract This is the 32 bit unique ID that represents the user in the legacy manner. 1454 + @discussion This is the 32 bit unique ID that represents the user in the legacy manner. 1455 + Format is a signed integer represented as a string. 1456 + */ 1457 + CF_EXPORT 1458 + const ODAttributeType kODAttributeTypeUniqueID; 1459 + 1460 + /*! 1461 + @const kODAttributeTypeUserCertificate 1462 + @abstract Attribute containing the binary of the user's certificate. 1463 + @discussion Attribute containing the binary of the user's certificate. 1464 + Usually found in user records. The certificate is data which identifies a user. 1465 + This data is attested to by a known party, and can be independently verified 1466 + by a third party. 1467 + */ 1468 + CF_EXPORT 1469 + const ODAttributeType kODAttributeTypeUserCertificate; 1470 + 1471 + /*! 1472 + @const kODAttributeTypeUserPKCS12Data 1473 + @abstract Attribute containing binary data in PKCS #12 format. 1474 + @discussion Attribute containing binary data in PKCS #12 format. 1475 + Usually found in user records. The value can contain keys, certificates, 1476 + and other related information and is encrypted with a passphrase. 1477 + */ 1478 + CF_EXPORT 1479 + const ODAttributeType kODAttributeTypeUserPKCS12Data; 1480 + 1481 + /*! 1482 + @const kODAttributeTypeUserShell 1483 + @abstract Used to represent the user's shell setting. 1484 + @discussion Used to represent the user's shell setting. 1485 + */ 1486 + CF_EXPORT 1487 + const ODAttributeType kODAttributeTypeUserShell; 1488 + 1489 + /*! 1490 + @const kODAttributeTypeUserSMIMECertificate 1491 + @abstract Attribute containing the binary of the user's SMIME certificate. 1492 + @discussion Attribute containing the binary of the user's SMIME certificate. 1493 + Usually found in user records. The certificate is data which identifies a user. 1494 + This data is attested to by a known party, and can be independently verified 1495 + by a third party. SMIME certificates are often used for signed or encrypted 1496 + emails. 1497 + */ 1498 + CF_EXPORT 1499 + const ODAttributeType kODAttributeTypeUserSMIMECertificate; 1500 + 1501 + /*! 1502 + @const kODAttributeTypeVFSDumpFreq 1503 + @abstract Attribute used to support mount records. 1504 + @discussion Attribute used to support mount records. 1505 + */ 1506 + CF_EXPORT 1507 + const ODAttributeType kODAttributeTypeVFSDumpFreq; 1508 + 1509 + /*! 1510 + @const kODAttributeTypeVFSLinkDir 1511 + @abstract Attribute used to support mount records. 1512 + @discussion Attribute used to support mount records. 1513 + */ 1514 + CF_EXPORT 1515 + const ODAttributeType kODAttributeTypeVFSLinkDir; 1516 + 1517 + /*! 1518 + @const kODAttributeTypeVFSPassNo 1519 + @abstract Attribute used to support mount records. 1520 + @discussion Attribute used to support mount records. 1521 + */ 1522 + CF_EXPORT 1523 + const ODAttributeType kODAttributeTypeVFSPassNo; 1524 + 1525 + /*! 1526 + @const kODAttributeTypeVFSType 1527 + @abstract Attribute used to support mount records. 1528 + @discussion Attribute used to support mount records. 1529 + */ 1530 + CF_EXPORT 1531 + const ODAttributeType kODAttributeTypeVFSType; 1532 + 1533 + /*! 1534 + @const kODAttributeTypeWeblogURI 1535 + @abstract attribute that defines the URI of a user's weblog. 1536 + @discussion attribute that defines the URI of a user's weblog. 1537 + Usually found in user records (kODRecordTypeUsers). 1538 + Example: http://example.com/blog/jsmith 1539 + */ 1540 + CF_EXPORT 1541 + const ODAttributeType kODAttributeTypeWeblogURI; 1542 + 1543 + /*! 1544 + @const kODAttributeTypeXMLPlist 1545 + @abstract XML plist used. 1546 + @discussion XML plist used. 1547 + */ 1548 + CF_EXPORT 1549 + const ODAttributeType kODAttributeTypeXMLPlist; 1550 + 1551 + /*! 1552 + @const kODAttributeTypeProtocolNumber 1553 + @abstract Attribute that defines a protocol number. 1554 + @discussion Attribute that defines a protocol number. Usually found 1555 + in protocol records (kODRecordTypeProtocols) 1556 + */ 1557 + CF_EXPORT 1558 + const ODAttributeType kODAttributeTypeProtocolNumber; 1559 + 1560 + /*! 1561 + @const kODAttributeTypeRPCNumber 1562 + @abstract Attribute that defines an RPC number. 1563 + @discussion Attribute that defines an RPC number. Usually found 1564 + in RPC records (kODRecordTypeRPC) 1565 + */ 1566 + CF_EXPORT 1567 + const ODAttributeType kODAttributeTypeRPCNumber; 1568 + 1569 + /*! 1570 + @const kODAttributeTypeNetworkNumber 1571 + @abstract Attribute that defines a network number. 1572 + @discussion Attribute that defines a network number. Usually found 1573 + in network records (kODRecordTypeNetworks) 1574 + */ 1575 + CF_EXPORT 1576 + const ODAttributeType kODAttributeTypeNetworkNumber; 1577 + 1578 + /*! 1579 + @const kODAttributeTypeAccessControlEntry 1580 + @abstract Attribute type which stores directory access control directives. 1581 + @discussion Attribute type which stores directory access control directives. 1582 + */ 1583 + CF_EXPORT 1584 + const ODAttributeType kODAttributeTypeAccessControlEntry; 1585 + 1586 + /*! 1587 + @const kODAttributeTypeAddressLine1 1588 + @abstract Line one of multiple lines of address data for a user. 1589 + @discussion Line one of multiple lines of address data for a user. 1590 + */ 1591 + CF_EXPORT 1592 + const ODAttributeType kODAttributeTypeAddressLine1; 1593 + 1594 + /*! 1595 + @const kODAttributeTypeAddressLine2 1596 + @abstract Line two of multiple lines of address data for a user. 1597 + @discussion Line two of multiple lines of address data for a user. 1598 + */ 1599 + CF_EXPORT 1600 + const ODAttributeType kODAttributeTypeAddressLine2; 1601 + 1602 + /*! 1603 + @const kODAttributeTypeAddressLine3 1604 + @abstract Line three of multiple lines of address data for a user. 1605 + @discussion Line three of multiple lines of address data for a user. 1606 + */ 1607 + CF_EXPORT 1608 + const ODAttributeType kODAttributeTypeAddressLine3; 1609 + 1610 + /*! 1611 + @const kODAttributeTypeAreaCode 1612 + @abstract Area code of a user's phone number. 1613 + @discussion Area code of a user's phone number. 1614 + */ 1615 + CF_EXPORT 1616 + const ODAttributeType kODAttributeTypeAreaCode; 1617 + 1618 + /*! 1619 + @const kODAttributeTypeAuthenticationAuthority 1620 + @abstract Determines what mechanism is used to verify or set a user's password. 1621 + @discussion Determines what mechanism is used to verify or set a user's password. 1622 + If multiple values are present, the first attributes returned take precedence. 1623 + Typically found in User records (kODRecordTypeUsers). 1624 + 1625 + Authentication authorities are a multi-part string separated by semi-colons. 1626 + One component is the "type" of authority, such as those listed below: 1627 + 1628 + "basic" - is a crypt password 1629 + "ShadowHash" - is a hashed password stored in a secure location 1630 + "ApplePasswordServer" - is a password server-based account 1631 + "Kerberosv5" - is a Kerberosv5 based 1632 + "LocalCachedUser" - is a cached account based on an account from another node, using a ShadowHash password 1633 + "DisabledUser" - is an account that has been disabled 1634 + */ 1635 + CF_EXPORT 1636 + const ODAttributeType kODAttributeTypeAuthenticationAuthority; 1637 + 1638 + /*! 1639 + @const kODAttributeTypeAutomountInformation 1640 + @abstract Determines what mechanism is used to verify or set a user's password. 1641 + @discussion Determines what mechanism is used to verify or set a user's password. 1642 + If multiple values are present, the first attributes returned take precedence. 1643 + Typically found in User records (kODRecordTypeUsers). 1644 + */ 1645 + CF_EXPORT 1646 + const ODAttributeType kODAttributeTypeAutomountInformation; 1647 + 1648 + /*! 1649 + @const kODAttributeTypeBootParams 1650 + @abstract Attribute type in host or machine records for storing boot params. 1651 + @discussion Attribute type in host or machine records for storing boot params. 1652 + */ 1653 + CF_EXPORT 1654 + const ODAttributeType kODAttributeTypeBootParams; 1655 + 1656 + /*! 1657 + @const kODAttributeTypeBuilding 1658 + @abstract Represents the building name for a user or person record. 1659 + @discussion Represents the building name for a user or person record. 1660 + Usually found in user or people records (kODRecordTypeUsers or 1661 + kODRecordTypePeople). 1662 + */ 1663 + CF_EXPORT 1664 + const ODAttributeType kODAttributeTypeBuilding; 1665 + 1666 + /*! 1667 + @const kODAttributeTypeServicesLocator 1668 + @abstract the URI for a record's calendar 1669 + @discussion the URI for a record's calendar 1670 + */ 1671 + CF_EXPORT 1672 + const ODAttributeType kODAttributeTypeServicesLocator; 1673 + 1674 + /*! 1675 + @const kODAttributeTypeCity 1676 + @abstract Usually, city for a user or person record. 1677 + @discussion Usually, city for a user or person record. 1678 + Usually found in user or people records (kODRecordTypeUsers or 1679 + kODRecordTypePeople). 1680 + */ 1681 + CF_EXPORT 1682 + const ODAttributeType kODAttributeTypeCity; 1683 + 1684 + /*! 1685 + @const kODAttributeTypeCompany 1686 + @abstract attribute that defines the user's company. 1687 + @discussion attribute that defines the user's company. 1688 + Example: Apple Inc. 1689 + */ 1690 + CF_EXPORT 1691 + const ODAttributeType kODAttributeTypeCompany; 1692 + 1693 + /*! 1694 + @const kODAttributeTypeComputers 1695 + @abstract List of computers. 1696 + @discussion List of computers. 1697 + */ 1698 + CF_EXPORT 1699 + const ODAttributeType kODAttributeTypeComputers; 1700 + 1701 + /*! 1702 + @const kODAttributeTypeCountry 1703 + @abstract Represents country of a record entry. 1704 + @discussion Represents country of a record entry. 1705 + Usually found in user or people records (kODRecordTypeUsers or 1706 + kODRecordTypePeople). 1707 + */ 1708 + CF_EXPORT 1709 + const ODAttributeType kODAttributeTypeCountry; 1710 + 1711 + /*! 1712 + @const kODAttributeTypeDepartment 1713 + @abstract Represents the department name of a user or person. 1714 + @discussion Represents the department name of a user or person. 1715 + Usually found in user or people records (kODRecordTypeUsers or 1716 + kODRecordTypePeople). 1717 + */ 1718 + CF_EXPORT 1719 + const ODAttributeType kODAttributeTypeDepartment; 1720 + 1721 + /*! 1722 + @const kODAttributeTypeDNSName 1723 + @abstract DNS Resolver nameserver attribute. 1724 + @discussion DNS Resolver nameserver attribute. 1725 + */ 1726 + CF_EXPORT 1727 + const ODAttributeType kODAttributeTypeDNSName; 1728 + 1729 + /*! 1730 + @const kODAttributeTypeEMailAddress 1731 + @abstract Email address of usually a user record. 1732 + @discussion Email address of usually a user record. 1733 + */ 1734 + CF_EXPORT 1735 + const ODAttributeType kODAttributeTypeEMailAddress; 1736 + 1737 + /*! 1738 + @const kODAttributeTypeEMailContacts 1739 + @abstract Attribute that defines a record's custom email addresses. 1740 + @discussion Attribute that defines a record's custom email addresses. 1741 + found in user records (kODRecordTypeUsers). 1742 + Example: home:johndoe\@mymail.com 1743 + */ 1744 + CF_EXPORT 1745 + const ODAttributeType kODAttributeTypeEMailContacts; 1746 + 1747 + /*! 1748 + @const kODAttributeTypeFaxNumber 1749 + @abstract Represents the FAX numbers of a user or person. 1750 + @discussion Represents the FAX numbers of a user or person. 1751 + Usually found in user or people records (kODRecordTypeUsers or 1752 + kODRecordTypePeople). 1753 + */ 1754 + CF_EXPORT 1755 + const ODAttributeType kODAttributeTypeFaxNumber; 1756 + 1757 + /*! 1758 + @const kODAttributeTypeGroup 1759 + @abstract List of groups. 1760 + @discussion List of groups. 1761 + */ 1762 + CF_EXPORT 1763 + const ODAttributeType kODAttributeTypeGroup; 1764 + 1765 + /*! 1766 + @const kODAttributeTypeGroupMembers 1767 + @abstract Attribute type in group records containing lists of GUID values for members other than groups. 1768 + @discussion Attribute type in group records containing lists of GUID values for members other than groups. 1769 + */ 1770 + CF_EXPORT 1771 + const ODAttributeType kODAttributeTypeGroupMembers; 1772 + 1773 + /*! 1774 + @const kODAttributeTypeGroupMembership 1775 + @abstract Usually a list of users that below to a given group record. 1776 + @discussion Usually a list of users that below to a given group record. 1777 + */ 1778 + CF_EXPORT 1779 + const ODAttributeType kODAttributeTypeGroupMembership; 1780 + 1781 + /*! 1782 + @const kODAttributeTypeGroupServices 1783 + @abstract xml-plist attribute that defines a group's services. 1784 + @discussion xml-plist attribute that defines a group's services. 1785 + Found in group records (kODRecordTypeGroups). 1786 + */ 1787 + CF_EXPORT 1788 + const ODAttributeType kODAttributeTypeGroupServices; 1789 + 1790 + /*! 1791 + @const kODAttributeTypeHomePhoneNumber 1792 + @abstract Home telephone number of a user or person. 1793 + @discussion Home telephone number of a user or person. 1794 + */ 1795 + CF_EXPORT 1796 + const ODAttributeType kODAttributeTypeHomePhoneNumber; 1797 + 1798 + /*! 1799 + @const kODAttributeTypeHTML 1800 + @abstract HTML location. 1801 + @discussion HTML location. 1802 + */ 1803 + CF_EXPORT 1804 + const ODAttributeType kODAttributeTypeHTML; 1805 + 1806 + /*! 1807 + @const kODAttributeTypeHomeDirectory 1808 + @abstract Network home directory URL. 1809 + @discussion Network home directory URL. 1810 + */ 1811 + CF_EXPORT 1812 + const ODAttributeType kODAttributeTypeHomeDirectory; 1813 + 1814 + /*! 1815 + @const kODAttributeTypeIMHandle 1816 + @abstract Represents the Instant Messaging handles of a user. 1817 + @discussion Represents the Instant Messaging handles of a user. 1818 + Values should be prefixed with the appropriate IM type 1819 + (i.e., AIM:, Jabber:, MSN:, Yahoo:, or ICQ:). 1820 + Usually found in user records (kODRecordTypeUsers). 1821 + */ 1822 + CF_EXPORT 1823 + const ODAttributeType kODAttributeTypeIMHandle; 1824 + 1825 + /*! 1826 + @const kODAttributeTypeIPAddress 1827 + @abstract IP address expressed either as domain or IP notation. 1828 + @discussion IP address expressed either as domain or IP notation. 1829 + */ 1830 + CF_EXPORT 1831 + const ODAttributeType kODAttributeTypeIPAddress; 1832 + 1833 + /*! 1834 + @const kODAttributeTypeIPAddressAndENetAddress 1835 + @abstract A pairing of IPv4 or IPv6 addresses with Ethernet addresses 1836 + @discussion A pairing of IPv4 or IPv6 addresses with Ethernet addresses 1837 + (e.g., "10.1.1.1/00:16:cb:92:56:41"). Usually found on kODRecordTypeComputers for use by 1838 + services that need specific pairing of the two values. This should be in addition to 1839 + kODAttributeTypeIPAddress, kODAttributeTypeIPv6Address and kODAttributeTypeENetAddress. This is 1840 + necessary because not all directories return attribute values in a guaranteed order. 1841 + */ 1842 + CF_EXPORT 1843 + const ODAttributeType kODAttributeTypeIPAddressAndENetAddress; 1844 + 1845 + /*! 1846 + @const kODAttributeTypeIPv6Address 1847 + @abstract IPv6 address expressed in the standard notation 1848 + @discussion IPv6 address expressed in the standard notation (e.g., "fe80::236:caff:fcc2:5641") 1849 + Usually found on kODRecordTypeComputers and kODRecordTypeHosts. 1850 + */ 1851 + CF_EXPORT 1852 + const ODAttributeType kODAttributeTypeIPv6Address; 1853 + 1854 + /*! 1855 + @const kODAttributeTypeJPEGPhoto 1856 + @abstract Used to store binary picture data in JPEG format. 1857 + @discussion Used to store binary picture data in JPEG format. 1858 + Usually found in user, people or group records (kODRecordTypeUsers, 1859 + kODRecordTypePeople, kODRecordTypeGroups). 1860 + */ 1861 + CF_EXPORT 1862 + const ODAttributeType kODAttributeTypeJPEGPhoto; 1863 + 1864 + /*! 1865 + @const kODAttributeTypeJobTitle 1866 + @abstract Represents the job title of a user. 1867 + @discussion Represents the job title of a user. 1868 + Usually found in user or people records (kODRecordTypeUsers or 1869 + kODRecordTypePeople). 1870 + */ 1871 + CF_EXPORT 1872 + const ODAttributeType kODAttributeTypeJobTitle; 1873 + 1874 + /*! 1875 + @const kODAttributeTypeKDCAuthKey 1876 + @abstract KDC master key RSA encrypted with realm public key. 1877 + @discussion KDC master key RSA encrypted with realm public key. 1878 + */ 1879 + CF_EXPORT 1880 + const ODAttributeType kODAttributeTypeKDCAuthKey; 1881 + 1882 + /*! 1883 + @const kODAttributeTypeKeywords 1884 + @abstract Keywords using for searching capability. 1885 + @discussion Keywords using for searching capability. 1886 + */ 1887 + CF_EXPORT 1888 + const ODAttributeType kODAttributeTypeKeywords; 1889 + 1890 + /*! 1891 + @const kODAttributeTypeLDAPReadReplicas 1892 + @abstract List of LDAP server URLs which can each be used to read directory data. 1893 + @discussion List of LDAP server URLs which can each be used to read directory data. 1894 + */ 1895 + CF_EXPORT 1896 + const ODAttributeType kODAttributeTypeLDAPReadReplicas; 1897 + 1898 + /*! 1899 + @const kODAttributeTypeLDAPWriteReplicas 1900 + @abstract List of LDAP server URLs which can each be used to write directory data. 1901 + @discussion List of LDAP server URLs which can each be used to write directory data. 1902 + */ 1903 + CF_EXPORT 1904 + const ODAttributeType kODAttributeTypeLDAPWriteReplicas; 1905 + 1906 + /*! 1907 + @const kODAttributeTypeMapCoordinates 1908 + @abstract attribute that defines coordinates for a user's location. 1909 + @discussion attribute that defines coordinates for a user's location . 1910 + found in user records (kODRecordTypeUsers) and resource records (kODRecordTypeResources). 1911 + Example: 7.7,10.6 1912 + */ 1913 + CF_EXPORT 1914 + const ODAttributeType kODAttributeTypeMapCoordinates; 1915 + 1916 + /*! 1917 + @const kODAttributeTypeMapURI 1918 + @abstract attribute that defines the URI of a user's location. 1919 + @discussion attribute that defines the URI of a user's location. 1920 + Usually found in user records (kODRecordTypeUsers). 1921 + Example: http://example.com/bldg1 1922 + */ 1923 + CF_EXPORT 1924 + const ODAttributeType kODAttributeTypeMapURI; 1925 + 1926 + /*! 1927 + @const kODAttributeTypeMIME 1928 + @abstract Data contained in this attribute type is a fully qualified MIME Type. 1929 + @discussion Data contained in this attribute type is a fully qualified MIME Type. 1930 + */ 1931 + CF_EXPORT 1932 + const ODAttributeType kODAttributeTypeMIME; 1933 + 1934 + /*! 1935 + @const kODAttributeTypeMobileNumber 1936 + @abstract Represents the mobile numbers of a user or person. 1937 + @discussion Represents the mobile numbers of a user or person. 1938 + Usually found in user or people records (kODRecordTypeUsers or 1939 + kODRecordTypePeople). 1940 + */ 1941 + CF_EXPORT 1942 + const ODAttributeType kODAttributeTypeMobileNumber; 1943 + 1944 + /*! 1945 + @const kODAttributeTypeNestedGroups 1946 + @abstract Attribute type in group records for the list of GUID values for nested groups. 1947 + @discussion Attribute type in group records for the list of GUID values for nested groups. 1948 + */ 1949 + CF_EXPORT 1950 + const ODAttributeType kODAttributeTypeNestedGroups; 1951 + 1952 + /*! 1953 + @const kODAttributeTypeNetGroups 1954 + @abstract Attribute type that indicates which netgroups its record is a member of. 1955 + @discussion Attribute type that indicates which netgroups its record is a member of. 1956 + Found in user and host records. 1957 + */ 1958 + CF_EXPORT 1959 + const ODAttributeType kODAttributeTypeNetGroups; 1960 + 1961 + /*! 1962 + @const kODAttributeTypeNickName 1963 + @abstract Represents the nickname of a user or person. 1964 + @discussion Represents the nickname of a user or person. 1965 + Usually found in user or people records (kODRecordTypeUsers or 1966 + kODRecordTypePeople). 1967 + */ 1968 + CF_EXPORT 1969 + const ODAttributeType kODAttributeTypeNickName; 1970 + 1971 + /*! 1972 + @const kODAttributeTypeOrganizationInfo 1973 + @abstract Usually the organization info of a user. 1974 + @discussion Usually the organization info of a user. 1975 + */ 1976 + CF_EXPORT 1977 + const ODAttributeType kODAttributeTypeOrganizationInfo; 1978 + 1979 + /*! 1980 + @const kODAttributeTypeOrganizationName 1981 + @abstract Usually the organization of a user. 1982 + @discussion Usually the organization of a user. 1983 + */ 1984 + CF_EXPORT 1985 + const ODAttributeType kODAttributeTypeOrganizationName; 1986 + 1987 + /*! 1988 + @const kODAttributeTypePagerNumber 1989 + @abstract Represents the pager numbers of a user or person. 1990 + @discussion Represents the pager numbers of a user or person. 1991 + Usually found in user or people records (kODRecordTypeUsers or 1992 + kODRecordTypePeople). 1993 + */ 1994 + CF_EXPORT 1995 + const ODAttributeType kODAttributeTypePagerNumber; 1996 + 1997 + /*! 1998 + @const kODAttributeTypePhoneContacts 1999 + @abstract attribute that defines a record's custom phone numbers. 2000 + @discussion attribute that defines a record's custom phone numbers. 2001 + found in user or people records. 2002 + Example: home fax:408-555-4444 2003 + */ 2004 + CF_EXPORT 2005 + const ODAttributeType kODAttributeTypePhoneContacts; 2006 + 2007 + /*! 2008 + @const kODAttributeTypePhoneNumber 2009 + @abstract Telephone number of a user. 2010 + @discussion Telephone number of a user. 2011 + */ 2012 + CF_EXPORT 2013 + const ODAttributeType kODAttributeTypePhoneNumber; 2014 + 2015 + /*! 2016 + @const kODAttributeTypePGPPublicKey 2017 + @abstract Pretty Good Privacy public encryption key. 2018 + @discussion Pretty Good Privacy public encryption key. 2019 + */ 2020 + CF_EXPORT 2021 + const ODAttributeType kODAttributeTypePGPPublicKey; 2022 + 2023 + /*! 2024 + @const kODAttributeTypePostalAddress 2025 + @abstract The postal address usually excluding postal code. 2026 + @discussion The postal address usually excluding postal code. 2027 + */ 2028 + CF_EXPORT 2029 + const ODAttributeType kODAttributeTypePostalAddress; 2030 + 2031 + /*! 2032 + @const kODAttributeTypePostalAddressContacts 2033 + @abstract attribute that defines a record's alternate postal addresses. 2034 + @discussion attribute that defines a record's alternate postal addresses. 2035 + Found in user records (kODRecordTypeUsers) and resource records (kODRecordTypeResources). 2036 + */ 2037 + CF_EXPORT 2038 + const ODAttributeType kODAttributeTypePostalAddressContacts; 2039 + 2040 + /*! 2041 + @const kODAttributeTypePostalCode 2042 + @abstract The postal code such as zip code in the USA. 2043 + @discussion The postal code such as zip code in the USA. 2044 + */ 2045 + CF_EXPORT 2046 + const ODAttributeType kODAttributeTypePostalCode; 2047 + 2048 + /*! 2049 + @const kODAttributeTypeNamePrefix 2050 + @abstract Represents the title prefix of a user or person. 2051 + @discussion Represents the title prefix of a user or person. 2052 + ie. Mr., Ms., Mrs., Dr., etc. 2053 + Usually found in user or people records (kODRecordTypeUsers or 2054 + kODRecordTypePeople). 2055 + */ 2056 + CF_EXPORT 2057 + const ODAttributeType kODAttributeTypeNamePrefix; 2058 + 2059 + /*! 2060 + @const kODAttributeTypeProfiles 2061 + @abstract Profiles associated with the record. 2062 + */ 2063 + CF_EXPORT 2064 + const ODAttributeType kODAttributeTypeProfiles __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 2065 + 2066 + /*! 2067 + @const kODAttributeTypeProfilesTimestamp 2068 + @abstract Timestamp for the profiles associated with the record. 2069 + */ 2070 + CF_EXPORT 2071 + const ODAttributeType kODAttributeTypeProfilesTimestamp __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 2072 + 2073 + /*! 2074 + @const kODAttributeTypeProtocols 2075 + @abstract List of protocols. 2076 + @discussion List of protocols. 2077 + */ 2078 + CF_EXPORT 2079 + const ODAttributeType kODAttributeTypeProtocols; 2080 + 2081 + /*! 2082 + @const kODAttributeTypeRecordName 2083 + @abstract List of names/keys for this record. 2084 + @discussion List of names/keys for this record. 2085 + */ 2086 + CF_EXPORT 2087 + const ODAttributeType kODAttributeTypeRecordName; 2088 + 2089 + /*! 2090 + @const kODAttributeTypeRelationships 2091 + @abstract attribute that defines the relationship to the record type. 2092 + @discussion attribute that defines the relationship to the record type. 2093 + found in user records (kODRecordTypeUsers). 2094 + Example: brother:John 2095 + */ 2096 + CF_EXPORT 2097 + const ODAttributeType kODAttributeTypeRelationships; 2098 + 2099 + /*! 2100 + @const kODAttributeTypeResourceInfo 2101 + @abstract attribute that defines a resource record's info. 2102 + @discussion attribute that defines a resource record's info. 2103 + */ 2104 + CF_EXPORT 2105 + const ODAttributeType kODAttributeTypeResourceInfo; 2106 + 2107 + /*! 2108 + @const kODAttributeTypeResourceType 2109 + @abstract Attribute type for the kind of resource. 2110 + @discussion Attribute type for the kind of resource. 2111 + found in resource records (kODRecordTypeResources). 2112 + Example: ConferenceRoom 2113 + */ 2114 + CF_EXPORT 2115 + const ODAttributeType kODAttributeTypeResourceType; 2116 + 2117 + /*! 2118 + @const kODAttributeTypeState 2119 + @abstract The state or province of a country. 2120 + @discussion The state or province of a country. 2121 + */ 2122 + CF_EXPORT 2123 + const ODAttributeType kODAttributeTypeState; 2124 + 2125 + /*! 2126 + @const kODAttributeTypeStreet 2127 + @abstract Represents the street address of a user or person. 2128 + @discussion Represents the street address of a user or person. 2129 + Usually found in user or people records (kODRecordTypeUsers or 2130 + kODRecordTypePeople). 2131 + */ 2132 + CF_EXPORT 2133 + const ODAttributeType kODAttributeTypeStreet; 2134 + 2135 + /*! 2136 + @const kODAttributeTypeNameSuffix 2137 + @abstract Represents the name suffix of a user or person. 2138 + @discussion Represents the name suffix of a user or person. 2139 + i.e., Jr., Sr., etc. 2140 + Usually found in user or people records (kODRecordTypeUsers or 2141 + kODRecordTypePeople). 2142 + */ 2143 + CF_EXPORT 2144 + const ODAttributeType kODAttributeTypeNameSuffix; 2145 + 2146 + /*! 2147 + @const kODAttributeTypeURL 2148 + @abstract List of URLs. 2149 + @discussion List of URLs. 2150 + */ 2151 + CF_EXPORT 2152 + const ODAttributeType kODAttributeTypeURL; 2153 + 2154 + /*! 2155 + @const kODAttributeTypeVFSOpts 2156 + @abstract Used in support of mount records. 2157 + @discussion Used in support of mount records. 2158 + */ 2159 + CF_EXPORT 2160 + const ODAttributeType kODAttributeTypeVFSOpts; 2161 + 2162 + /*! 2163 + @const kODAttributeTypeAlias 2164 + @abstract Alias attribute, contain pointer to another node/record/attribute. 2165 + @discussion Alias attribute, contain pointer to another node/record/attribute. 2166 + */ 2167 + CF_EXPORT 2168 + const ODAttributeType kODAttributeTypeAlias; 2169 + 2170 + /*! 2171 + @const kODAttributeTypeAuthCredential 2172 + @abstract An authentication credential, to be used to authenticate to a Directory. 2173 + @discussion An authentication credential, to be used to authenticate to a Directory. 2174 + */ 2175 + CF_EXPORT 2176 + const ODAttributeType kODAttributeTypeAuthCredential; 2177 + 2178 + /*! 2179 + @const kODAttributeTypeCopyTimestamp 2180 + @abstract Timestamp used in local account caching. 2181 + @discussion Timestamp used in local account caching. 2182 + */ 2183 + CF_EXPORT 2184 + const ODAttributeType kODAttributeTypeCopyTimestamp; 2185 + 2186 + /*! 2187 + @const kODAttributeTypeDateRecordCreated 2188 + @abstract Date of record creation. 2189 + @discussion Date of record creation. 2190 + */ 2191 + CF_EXPORT 2192 + const ODAttributeType kODAttributeTypeDateRecordCreated; 2193 + 2194 + /*! 2195 + @const kODAttributeTypeKerberosRealm 2196 + @abstract Supports Kerberized SMB Server services. 2197 + @discussion Supports Kerberized SMB Server services. 2198 + */ 2199 + CF_EXPORT 2200 + const ODAttributeType kODAttributeTypeKerberosRealm; 2201 + 2202 + /*! 2203 + @const kODAttributeTypeNTDomainComputerAccount 2204 + @abstract Supports Kerberized SMB Server services. 2205 + @discussion Supports Kerberized SMB Server services. 2206 + */ 2207 + CF_EXPORT 2208 + const ODAttributeType kODAttributeTypeNTDomainComputerAccount; 2209 + 2210 + /*! 2211 + @const kODAttributeTypeOriginalHomeDirectory 2212 + @abstract Home directory URL used in local account caching. 2213 + @discussion Home directory URL used in local account caching. 2214 + */ 2215 + CF_EXPORT 2216 + const ODAttributeType kODAttributeTypeOriginalHomeDirectory; 2217 + 2218 + /*! 2219 + @const kODAttributeTypeOriginalNFSHomeDirectory 2220 + @abstract NFS home directory used in local account caching. 2221 + @discussion NFS home directory used in local account caching. 2222 + */ 2223 + CF_EXPORT 2224 + const ODAttributeType kODAttributeTypeOriginalNFSHomeDirectory; 2225 + 2226 + /*! 2227 + @const kODAttributeTypeOriginalNodeName 2228 + @abstract Nodename used in local account caching. 2229 + @discussion Nodename used in local account caching. 2230 + */ 2231 + CF_EXPORT 2232 + const ODAttributeType kODAttributeTypeOriginalNodeName; 2233 + 2234 + /*! 2235 + @const kODAttributeTypePrimaryNTDomain 2236 + @abstract Supports Kerberized SMB Server services. 2237 + @discussion Supports Kerberized SMB Server services. 2238 + */ 2239 + CF_EXPORT 2240 + const ODAttributeType kODAttributeTypePrimaryNTDomain; 2241 + 2242 + /*! 2243 + @const kODAttributeTypePwdAgingPolicy 2244 + @abstract Contains the password aging policy data for an authentication capable record. 2245 + @discussion Contains the password aging policy data for an authentication capable record. 2246 + */ 2247 + CF_EXPORT 2248 + const ODAttributeType kODAttributeTypePwdAgingPolicy; 2249 + 2250 + /*! 2251 + @const kODAttributeTypeReadOnlyNode 2252 + @abstract Can be found using dsGetDirNodeInfo and will return one of 2253 + ReadOnly, ReadWrite, or WriteOnly strings. 2254 + @discussion Can be found using dsGetDirNodeInfo and will return one of 2255 + ReadOnly, ReadWrite, or WriteOnly strings. 2256 + Note that ReadWrite does not imply fully readable or writable 2257 + */ 2258 + CF_EXPORT 2259 + const ODAttributeType kODAttributeTypeReadOnlyNode; 2260 + 2261 + /*! 2262 + @const kODAttributeTypeTimePackage 2263 + @abstract Data of Create, Modify, Backup time in UTC. 2264 + @discussion Data of Create, Modify, Backup time in UTC. 2265 + */ 2266 + CF_EXPORT 2267 + const ODAttributeType kODAttributeTypeTimePackage; 2268 + 2269 + /*! 2270 + @const kODAttributeTypeTotalSize 2271 + @abstract checksum/meta data. 2272 + @discussion checksum/meta data. 2273 + */ 2274 + CF_EXPORT 2275 + const ODAttributeType kODAttributeTypeTotalSize; 2276 + 2277 + /*! 2278 + @const kODAttributeTypeAuthMethod 2279 + @abstract Authentication method for an authentication capable record. 2280 + @discussion Authentication method for an authentication capable record. 2281 + */ 2282 + CF_EXPORT 2283 + const ODAttributeType kODAttributeTypeAuthMethod; 2284 + 2285 + /*! 2286 + @const kODAttributeTypeMetaNodeLocation 2287 + @abstract Meta attribute returning registered node name by directory node plugin. 2288 + @discussion Meta attribute returning registered node name by directory node plugin. 2289 + */ 2290 + CF_EXPORT 2291 + const ODAttributeType kODAttributeTypeMetaNodeLocation; 2292 + 2293 + /*! 2294 + @const kODAttributeTypeNodePath 2295 + @abstract Attribute type in Neighborhood records describing the DS Node to search while 2296 + looking up aliases in this neighborhood. 2297 + @discussion Attribute type in Neighborhood records describing the DS Node to search while 2298 + looking up aliases in this neighborhood. 2299 + */ 2300 + CF_EXPORT 2301 + const ODAttributeType kODAttributeTypeNodePath; 2302 + 2303 + /*! 2304 + @const kODAttributeTypePlugInInfo 2305 + @abstract Information (version, signature, about, credits, etc.) about the plug-in 2306 + that is actually servicing a particular directory node. 2307 + @discussion Information (version, signature, about, credits, etc.) about the plug-in 2308 + that is actually servicing a particular directory node. 2309 + Has never been supported. 2310 + */ 2311 + CF_EXPORT 2312 + const ODAttributeType kODAttributeTypePlugInInfo; 2313 + 2314 + /*! 2315 + @const kODAttributeTypeRecordType 2316 + @abstract Attribute for a Record or a Directory Node. 2317 + @discussion Attribute for a Record or a Directory Node. 2318 + */ 2319 + CF_EXPORT 2320 + const ODAttributeType kODAttributeTypeRecordType; 2321 + 2322 + /*! 2323 + @const kODAttributeTypeSchema 2324 + @abstract List of attribute types. 2325 + @discussion List of attribute types. 2326 + */ 2327 + CF_EXPORT 2328 + const ODAttributeType kODAttributeTypeSchema; 2329 + 2330 + /*! 2331 + @const kODAttributeTypeSubNodes 2332 + @abstract Attribute of a node which lists the available subnodes 2333 + of that node. 2334 + @discussion Attribute of a node which lists the available subnodes 2335 + of that node. 2336 + */ 2337 + CF_EXPORT 2338 + const ODAttributeType kODAttributeTypeSubNodes; 2339 + 2340 + /*! 2341 + @const kODAttributeTypeNetGroupTriplet 2342 + @abstract Attribute that defines the host, user and domain triplet combinations 2343 + to support NetGroups. Each attribute value is comma separated string to maintain the 2344 + triplet (e.g., host,user,domain). 2345 + @discussion Attribute that defines the host, user and domain triplet combinations 2346 + to support NetGroups. Each attribute value is comma separated string to maintain the 2347 + triplet (e.g., host,user,domain). 2348 + */ 2349 + CF_EXPORT 2350 + const ODAttributeType kODAttributeTypeNetGroupTriplet; 2351 + 2352 + /*! 2353 + @const kODAttributeTypeSearchPath 2354 + @abstract Search path used by the search node. 2355 + @discussion Search path used by the search node. 2356 + */ 2357 + CF_EXPORT 2358 + const ODAttributeType kODAttributeTypeSearchPath; 2359 + 2360 + /*! 2361 + @const kODAttributeTypeSearchPolicy 2362 + @abstract Search policy for the search node. 2363 + @discussion Search policy for the search node. 2364 + */ 2365 + CF_EXPORT 2366 + const ODAttributeType kODAttributeTypeSearchPolicy; 2367 + 2368 + /*! 2369 + @const kODAttributeTypeAutomaticSearchPath 2370 + @abstract Automatic search path defined by the search node. 2371 + @discussion Automatic search path defined by the search node. 2372 + */ 2373 + CF_EXPORT 2374 + const ODAttributeType kODAttributeTypeAutomaticSearchPath; 2375 + 2376 + /*! 2377 + @const kODAttributeTypeLocalOnlySearchPath 2378 + @abstract Local only search path defined by the search node. 2379 + @discussion Local only search path defined by the search node. 2380 + */ 2381 + CF_EXPORT 2382 + const ODAttributeType kODAttributeTypeLocalOnlySearchPath; 2383 + 2384 + /*! 2385 + @const kODAttributeTypeCustomSearchPath 2386 + @abstract Admin user configured custom search path defined by the search node. 2387 + @discussion Admin user configured custom search path defined by the search node. 2388 + */ 2389 + CF_EXPORT 2390 + const ODAttributeType kODAttributeTypeCustomSearchPath; 2391 + 2392 + /*! 2393 + @const kODAttributeTypeNodeOptions 2394 + @abstract Any extended options supported by the node during creation 2395 + @discussion Any extended options supported by the node during creation 2396 + */ 2397 + CF_EXPORT 2398 + const ODAttributeType kODAttributeTypeNodeOptions __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2399 + 2400 + /*! 2401 + @const kODAttributeTypeNodeSASLRealm 2402 + @abstract Contains the SASL realm associated with this node (if any) 2403 + @discussion Contains the SASL realm associated with this node (if any) 2404 + */ 2405 + CF_EXPORT 2406 + const ODAttributeType kODAttributeTypeNodeSASLRealm __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 2407 + 2408 + /*! 2409 + @const kODAttributeTypeAdvertisedServices 2410 + */ 2411 + CF_EXPORT 2412 + const ODAttributeType kODAttributeTypeAdvertisedServices __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2413 + 2414 + /*! 2415 + @const kODAttributeTypeLocaleRelay 2416 + */ 2417 + CF_EXPORT 2418 + const ODAttributeType kODAttributeTypeLocaleRelay __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2419 + 2420 + /*! 2421 + @const kODAttributeTypeLocaleSubnets 2422 + */ 2423 + CF_EXPORT 2424 + const ODAttributeType kODAttributeTypeLocaleSubnets __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2425 + 2426 + /*! 2427 + @const kODAttributeTypeNetworkInterfaces 2428 + */ 2429 + CF_EXPORT 2430 + const ODAttributeType kODAttributeTypeNetworkInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2431 + 2432 + /*! 2433 + @const kODAttributeTypeParentLocales 2434 + */ 2435 + CF_EXPORT 2436 + const ODAttributeType kODAttributeTypeParentLocales __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2437 + 2438 + /*! 2439 + @const kODAttributeTypePrimaryLocale 2440 + */ 2441 + CF_EXPORT 2442 + const ODAttributeType kODAttributeTypePrimaryLocale __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 2443 + 2444 + #pragma mark Attribute Types (Configure Node) 2445 + 2446 + /*! 2447 + @const kODAttributeTypeBuildVersion 2448 + @abstract Build version for reference. 2449 + @discussion Build version for reference. 2450 + */ 2451 + CF_EXPORT 2452 + const ODAttributeType kODAttributeTypeBuildVersion; 2453 + 2454 + /*! 2455 + @const kODAttributeTypeConfigAvail 2456 + @abstract Config avail tag. 2457 + @discussion Config avail tag. 2458 + */ 2459 + CF_EXPORT 2460 + const ODAttributeType kODAttributeTypeConfigAvailable; 2461 + 2462 + /*! 2463 + @const kODAttributeTypeConfigFile 2464 + @abstract Config file name. 2465 + @discussion Config file name. 2466 + */ 2467 + CF_EXPORT 2468 + const ODAttributeType kODAttributeTypeConfigFile; 2469 + 2470 + /*! 2471 + @const kODAttributeTypeCoreFWVersion 2472 + @abstract Core FW version for reference. 2473 + @discussion Core FW version for reference. 2474 + */ 2475 + CF_EXPORT 2476 + const ODAttributeType kODAttributeTypeCoreFWVersion; 2477 + 2478 + /*! 2479 + @const kODAttributeTypeFunctionalState 2480 + @abstract Functional state of plugin for example. 2481 + @discussion Functional state of plugin for example. 2482 + */ 2483 + CF_EXPORT 2484 + const ODAttributeType kODAttributeTypeFunctionalState; 2485 + 2486 + /*! 2487 + @const kODAttributeTypeFWVersion 2488 + @abstract Framework version for reference. 2489 + @discussion Framework version for reference. 2490 + */ 2491 + CF_EXPORT 2492 + const ODAttributeType kODAttributeTypeFWVersion; 2493 + 2494 + /*! 2495 + @const kODAttributeTypePluginIndex 2496 + @abstract Plugin index for reference. 2497 + @discussion Plugin index for reference. 2498 + */ 2499 + CF_EXPORT 2500 + const ODAttributeType kODAttributeTypePluginIndex; 2501 + 2502 + /*! 2503 + @const kODAttributeTypeNumTableList 2504 + @abstract Summary of the reference table entries presented as attribute values 2505 + from the Configure node. 2506 + @discussion Summary of the reference table entries presented as attribute values 2507 + from the Configure node. 2508 + */ 2509 + CF_EXPORT 2510 + const ODAttributeType kODAttributeTypeNumTableList; 2511 + 2512 + /*! 2513 + @const kODAttributeTypeVersion 2514 + @abstract Version label. 2515 + @discussion Version label. 2516 + */ 2517 + CF_EXPORT 2518 + const ODAttributeType kODAttributeTypeVersion; 2519 + 2520 + /*! 2521 + @const kODAttributeTypePIDValue 2522 + @abstract PID value. 2523 + @discussion PID value. 2524 + */ 2525 + CF_EXPORT 2526 + const ODAttributeType kODAttributeTypePIDValue; 2527 + 2528 + /*! 2529 + @const kODAttributeTypeProcessName 2530 + @abstract Process Name. 2531 + @discussion Process Name. 2532 + */ 2533 + CF_EXPORT 2534 + const ODAttributeType kODAttributeTypeProcessName; 2535 + 2536 + /*! 2537 + @const kODAttributeTypeTotalRefCount 2538 + @abstract Total count of references for a process. 2539 + @discussion Total count of references for a process. 2540 + */ 2541 + CF_EXPORT 2542 + const ODAttributeType kODAttributeTypeTotalRefCount; 2543 + 2544 + /*! 2545 + @const kODAttributeTypeDirRefCount 2546 + @abstract Directory reference count for a process. 2547 + @discussion Directory reference count for a process. 2548 + */ 2549 + CF_EXPORT 2550 + const ODAttributeType kODAttributeTypeDirRefCount; 2551 + 2552 + /*! 2553 + @const kODAttributeTypeNodeRefCount 2554 + @abstract Node reference count for a process. 2555 + @discussion Node reference count for a process. 2556 + */ 2557 + CF_EXPORT 2558 + const ODAttributeType kODAttributeTypeNodeRefCount; 2559 + 2560 + /*! 2561 + @const kODAttributeTypeRecRefCount 2562 + @abstract Record reference count for a process. 2563 + @discussion Record reference count for a process. 2564 + */ 2565 + CF_EXPORT 2566 + const ODAttributeType kODAttributeTypeRecRefCount; 2567 + 2568 + /*! 2569 + @const kODAttributeTypeAttrListRefCount 2570 + @abstract Attribute List reference count for a process. 2571 + @discussion Attribute List reference count for a process. 2572 + */ 2573 + CF_EXPORT 2574 + const ODAttributeType kODAttributeTypeAttrListRefCount; 2575 + 2576 + /*! 2577 + @const kODAttributeTypeAttrListValueRefCount 2578 + @abstract Attr List Value reference count for a process. 2579 + @discussion Attr List Value reference count for a process. 2580 + */ 2581 + CF_EXPORT 2582 + const ODAttributeType kODAttributeTypeAttrListValueRefCount; 2583 + 2584 + /*! 2585 + @const kODAttributeTypeDirRefs 2586 + @abstract All the directory references for a process. 2587 + @discussion All the directory references for a process. 2588 + */ 2589 + CF_EXPORT 2590 + const ODAttributeType kODAttributeTypeDirRefs; 2591 + 2592 + /*! 2593 + @const kODAttributeTypeNodeRefs 2594 + @abstract All the node references for a process. 2595 + @discussion All the node references for a process. 2596 + */ 2597 + CF_EXPORT 2598 + const ODAttributeType kODAttributeTypeNodeRefs; 2599 + 2600 + /*! 2601 + @const kODAttributeTypeRecRefs 2602 + @abstract All the record references for a process. 2603 + @discussion All the record references for a process. 2604 + */ 2605 + CF_EXPORT 2606 + const ODAttributeType kODAttributeTypeRecRefs; 2607 + 2608 + /*! 2609 + @const kODAttributeTypeAttrListRefs 2610 + @abstract All the attribute list references for a process. 2611 + @discussion All the attribute list references for a process. 2612 + */ 2613 + CF_EXPORT 2614 + const ODAttributeType kODAttributeTypeAttrListRefs; 2615 + 2616 + /*! 2617 + @const kODAttributeTypeAttrListValueRefs 2618 + @abstract All the attribute list value references for a process. 2619 + @discussion All the attribute list value references for a process. 2620 + */ 2621 + CF_EXPORT 2622 + const ODAttributeType kODAttributeTypeAttrListValueRefs; 2623 + 2624 + #pragma mark Authentication Types 2625 + 2626 + /*! 2627 + @const kODAuthenticationType2WayRandom 2628 + @abstract Two way random authentication method. 2629 + @discussion Two way random authentication method. This method uses two passes to 2630 + complete the authentication. 2631 + 2632 + First pass authentication array has items: 2633 + user name in UTF8 encoding 2634 + 2635 + Second pass authentication array has items: 2636 + 8 byte DES digest, 2637 + 8 bytes of random 2638 + */ 2639 + CF_EXPORT 2640 + const ODAuthenticationType kODAuthenticationType2WayRandom; 2641 + 2642 + /*! 2643 + @const kODAuthenticationType2WayRandomChangePasswd 2644 + @abstract Change the password for a user using the two-way random method. 2645 + @discussion Change the password for a user using the two-way random method. 2646 + Does not require prior authentication. 2647 + 2648 + Authentication array has following items in order: 2649 + user name in UTF8 encoding, 2650 + old password encrypted with new (should be 8 chars), 2651 + new password encrypted with old (should be 8 chars) 2652 + */ 2653 + CF_EXPORT 2654 + const ODAuthenticationType kODAuthenticationType2WayRandomChangePasswd; 2655 + 2656 + /*! 2657 + @const kODAuthenticationTypeAPOP 2658 + @abstract APOP authentication method. 2659 + @discussion APOP authentication method. 2660 + 2661 + Authentication array has following items in order: 2662 + user name in UTF8 encoding, 2663 + server challenge in UTF8 encoding, 2664 + client response in UTF8 encoding 2665 + */ 2666 + CF_EXPORT 2667 + const ODAuthenticationType kODAuthenticationTypeAPOP; 2668 + 2669 + /*! 2670 + @const kODAuthenticationTypeCRAM_MD5 2671 + @abstract CRAM MD5 authentication method. 2672 + @discussion CRAM MD5 authentication method. 2673 + 2674 + Authentication array has following items in order: 2675 + user name in UTF8 encoding, 2676 + server challenge in UTF8 encoding, 2677 + client response data 2678 + */ 2679 + CF_EXPORT 2680 + const ODAuthenticationType kODAuthenticationTypeCRAM_MD5; 2681 + 2682 + /*! 2683 + @const kODAuthenticationTypeChangePasswd 2684 + @abstract Change the password for a user. 2685 + @discussion Change the password for a user. Does not require prior authentication. 2686 + 2687 + Authentication array has following items in order: 2688 + user name in UTF8 encoding, 2689 + old password in UTF8 encoding, 2690 + new password in UTF8 encoding 2691 + */ 2692 + CF_EXPORT 2693 + const ODAuthenticationType kODAuthenticationTypeChangePasswd; 2694 + 2695 + /*! 2696 + @const kODAuthenticationTypeClearText 2697 + @abstract Clear text authentication method. 2698 + @discussion Clear text authentication method. 2699 + 2700 + Authentication array has following items in order: 2701 + user name in UTF8 encoding, 2702 + password in UTF8 encoding 2703 + */ 2704 + CF_EXPORT 2705 + const ODAuthenticationType kODAuthenticationTypeClearText; 2706 + 2707 + /*! 2708 + @const kODAuthenticationTypeCrypt 2709 + @abstract Use a crypt password stored in the user record if available to 2710 + do the authentication. 2711 + @discussion Use a crypt password stored in the user record if available to 2712 + do the authentication. 2713 + 2714 + Authentication array has following items in order: 2715 + user name in UTF8 encoding, 2716 + password in UTF8 encoding 2717 + 2718 + This method may not be supported by all plug-ins or for all users. 2719 + */ 2720 + CF_EXPORT 2721 + const ODAuthenticationType kODAuthenticationTypeCrypt; 2722 + 2723 + /*! 2724 + @const kODAuthenticationTypeDIGEST_MD5 2725 + @abstract Digest MD5 authentication method. 2726 + @discussion Digest MD5 authentication method. 2727 + 2728 + Authentication array has following items in order: 2729 + user name in UTF8 encoding, 2730 + server challenge in UTF8 encoding, 2731 + client response data, 2732 + HTTP method in UTF8 encoding 2733 + */ 2734 + CF_EXPORT 2735 + const ODAuthenticationType kODAuthenticationTypeDIGEST_MD5; 2736 + 2737 + /*! 2738 + @const kODAuthenticationTypeDeleteUser 2739 + @abstract Used for Apple password server user deletion. 2740 + @discussion Used for Apple password server user deletion. 2741 + This authentication method is only implemented by the PasswordServer node. 2742 + 2743 + Authentication array has following items in order: 2744 + Password Server ID in UTF8 encoding, 2745 + authenticator password in UTF8 encoding, 2746 + user's Password Server ID in UTF8 encoding 2747 + */ 2748 + CF_EXPORT 2749 + const ODAuthenticationType kODAuthenticationTypeDeleteUser; 2750 + 2751 + /*! 2752 + @const kODAuthenticationTypeGetEffectivePolicy 2753 + @abstract Used to extract, from a password server, the actual policies that will be applied 2754 + to a user; a combination of global and user policies. 2755 + @discussion Used to extract, from a password server, the actual policies that will be applied 2756 + to a user; a combination of global and user policies. 2757 + 2758 + Authentication array has following items in order: 2759 + user name or Password Server ID in UTF8 encoding 2760 + */ 2761 + CF_EXPORT 2762 + const ODAuthenticationType kODAuthenticationTypeGetEffectivePolicy; 2763 + 2764 + /*! 2765 + @const kODAuthenticationTypeGetGlobalPolicy 2766 + @abstract Used for extraction of global authentication policy. 2767 + @discussion Used for extraction of global authentication policy. Authentication 2768 + is not required to get policies. The authenticator name and password 2769 + fields are optional. 2770 + 2771 + Authentication array has following items in order: 2772 + user name in UTF8 encoding 2773 + password in UTF8 encoding 2774 + */ 2775 + CF_EXPORT 2776 + const ODAuthenticationType kODAuthenticationTypeGetGlobalPolicy; 2777 + 2778 + /*! 2779 + @const kODAuthenticationTypeGetKerberosPrincipal 2780 + @abstract Retrieves Kerberos Principal name. 2781 + @discussion Retrieves Kerberos Principal name. 2782 + 2783 + Authentication array has following items in order: 2784 + user name in UTF8 encoding 2785 + */ 2786 + CF_EXPORT 2787 + const ODAuthenticationType kODAuthenticationTypeGetKerberosPrincipal; 2788 + 2789 + /*! 2790 + @const kODAuthenticationTypeGetPolicy 2791 + @abstract The plug-in should determine which specific authentication method to use. 2792 + @discussion The plug-in should determine which specific authentication method to use. 2793 + Authentication is not required to get policies. The authenticator name and password 2794 + fields may be left blank by using a length of 1 and a zero-byte for the data. 2795 + 2796 + Authentication array has following items in order: 2797 + authenticator's name or Password Server ID in UTF8 encoding, 2798 + authenticator's password in UTF8 encoding 2799 + account's name or Password Server ID 2800 + 2801 + The Password Server does not require authentication for this authentication method. 2802 + The first two fields are to cover us for future policy changes and to keep the buffer 2803 + format as standardized as possible. 2804 + */ 2805 + CF_EXPORT 2806 + const ODAuthenticationType kODAuthenticationTypeGetPolicy; 2807 + 2808 + /*! 2809 + @const kODAuthenticationTypeGetUserData 2810 + @abstract Used with Apple password server. 2811 + @discussion Used with Apple password server. The password server maintains a space 2812 + for a small amount of miscellaneous data. 2813 + This authentication method is only implemented by the PasswordServer node. 2814 + 2815 + Authentication array has following items in order: 2816 + authenticator's Password Server ID in UTF8 encoding, 2817 + authenticator's password in UTF8 encoding 2818 + Password Server ID in UTF8 encoding 2819 + */ 2820 + CF_EXPORT 2821 + const ODAuthenticationType kODAuthenticationTypeGetUserData; 2822 + 2823 + /*! 2824 + @const kODAuthenticationTypeGetUserName 2825 + @abstract Used with Apple password server. 2826 + @discussion Used with Apple password server. This name is the same as the primary 2827 + short name for the user. 2828 + This authentication method is only implemented by the PasswordServer node. 2829 + 2830 + Authentication array has following items in order: 2831 + authenticator's Password Server ID in UTF8 encoding, 2832 + authenticator's password in UTF8 encoding, 2833 + user's Password Server ID in UTF8 encoding 2834 + */ 2835 + CF_EXPORT 2836 + const ODAuthenticationType kODAuthenticationTypeGetUserName; 2837 + 2838 + /*! 2839 + @const kODAuthenticationTypeKerberosTickets 2840 + @abstract Provides write-access to LDAP with an existing Kerberos ticket. 2841 + @discussion Provides write-access to LDAP with an existing Kerberos ticket 2842 + 2843 + Authentication array has following items in order: 2844 + user name in UTF8 encoding, 2845 + krb5_data containing a service ticket 2846 + */ 2847 + CF_EXPORT 2848 + const ODAuthenticationType kODAuthenticationTypeKerberosTickets; 2849 + 2850 + /*! 2851 + @const kODAuthenticationTypeMPPEMasterKeys 2852 + @abstract Generated 40-bit or 128-bit master keys from MS-CHAPv2 credentials (RFC 3079). 2853 + @discussion Generated 40-bit or 128-bit master keys from MS-CHAPv2 credentials (RFC 3079). 2854 + 2855 + Authentication array has following items in order: 2856 + user name in UTF8 encoding, 2857 + MS-CHAPv2 digest (P24), 2858 + key size, 8 or 16 (packed as a byte, not a string) 2859 + */ 2860 + CF_EXPORT 2861 + const ODAuthenticationType kODAuthenticationTypeMPPEMasterKeys; 2862 + 2863 + /*! 2864 + @const kODAuthenticationTypeMSCHAP2 2865 + @abstract MS-CHAP2 is a mutual authentication method. 2866 + @discussion MS-CHAP2 is a mutual authentication method. The plug-in will generate the data to 2867 + send back to the client and put it in the continue items array. 2868 + 2869 + Authentication array has following items in order: 2870 + user name in UTF8 encoding, 2871 + server challenge, 2872 + peer challenge, 2873 + client's digest, 2874 + client's user name (the name used for MS-CHAPv2, usually the first short name) 2875 + 2876 + Continue items array contains: 2877 + digest for the client's challenge 2878 + */ 2879 + CF_EXPORT 2880 + const ODAuthenticationType kODAuthenticationTypeMSCHAP2; 2881 + 2882 + /*! 2883 + @const kODAuthenticationTypeNTLMv2 2884 + @abstract Verifies an NTLMv2 challenge and response. 2885 + @discussion Verifies an NTLMv2 challenge and response. The session keys 2886 + (if any) must be retrieved separately with a trusted authentication. 2887 + 2888 + Authentication array has following items in order: 2889 + user name in UTF8 encoding, 2890 + SMB server challenge, 2891 + the client "blob" which includes 16 bytes of client digest prefixed 2892 + to the the blob data, 2893 + the user name used to calculate the digest in UTF8 encoding, 2894 + the SMB domain in UTF8 encoding 2895 + */ 2896 + CF_EXPORT 2897 + const ODAuthenticationType kODAuthenticationTypeNTLMv2; 2898 + 2899 + /*! 2900 + @const kODAuthenticationTypeNTLMv2WithSessionKey 2901 + @abstract An optimized method that checks the user's challenge and response 2902 + and retrieves session keys in a single call. 2903 + @discussion An optimized method that checks the user's challenge and response 2904 + and retrieves session keys in a single call. If the NTLMv2 session key is 2905 + supported, it is returned in the step buffer. 2906 + 2907 + Authentication array has following items in order: 2908 + user name in UTF8 encoding, 2909 + SMB server challenge, 2910 + the client "blob" which includes 16 bytes of client digest prefixed 2911 + to the the blob data, 2912 + the user name used to calculate the digest in UTF8 encoding, 2913 + the SMB domain in UTF8 encoding, 2914 + user name in UTF8 encoding, 2915 + authenticator password in UTF8 encoding 2916 + */ 2917 + CF_EXPORT 2918 + const ODAuthenticationType kODAuthenticationTypeNTLMv2WithSessionKey; 2919 + 2920 + /*! 2921 + @const kODAuthenticationTypeNewUser 2922 + @abstract Create a new user record with the authentication authority. 2923 + @discussion Create a new user record with the authentication authority 2924 + This authentication method is only implemented by the PasswordServer node. 2925 + 2926 + Authentication array has following items in order: 2927 + authenticator's Password Server ID in UTF8 encoding, 2928 + authenticator's password in UTF8 encoding, 2929 + user's short-name, 2930 + user's password 2931 + */ 2932 + CF_EXPORT 2933 + const ODAuthenticationType kODAuthenticationTypeNewUser; 2934 + 2935 + /*! 2936 + @const kODAuthenticationTypeNewUserWithPolicy 2937 + @abstract Create a new user record with the authentication authority and initial policy settings. 2938 + @discussion Create a new user record with the authentication authority and initial policy settings 2939 + This authentication method is only implemented by the PasswordServer node. 2940 + 2941 + Authentication array has following items in order: 2942 + authenticator's Password Server ID in UTF8 encoding, 2943 + authenticator's password in UTF8 encoding, 2944 + user's short-name, 2945 + user's password, 2946 + policy string in UTF8 encoding 2947 + */ 2948 + CF_EXPORT 2949 + const ODAuthenticationType kODAuthenticationTypeNewUserWithPolicy; 2950 + 2951 + /*! 2952 + @const kODAuthenticationTypeNodeNativeClearTextOK 2953 + @abstract The plug-in should determine which specific authentication method to use. 2954 + @discussion The plug-in should determine which specific authentication method to use. 2955 + 2956 + Authentication array has following items in order: 2957 + user name in UTF8 encoding, 2958 + password in UTF8 encoding 2959 + 2960 + The plug-in may choose to use a cleartext authentication method if necessary. 2961 + */ 2962 + CF_EXPORT 2963 + const ODAuthenticationType kODAuthenticationTypeNodeNativeClearTextOK; 2964 + 2965 + /*! 2966 + @const kODAuthenticationTypeNodeNativeNoClearText 2967 + @abstract The plug-in should determine which specific authentication method to use. 2968 + @discussion The plug-in should determine which specific authentication method to use. 2969 + 2970 + Authentication array has following items in order: 2971 + user name in UTF8 encoding, 2972 + password in UTF8 encoding 2973 + 2974 + The plug-in must not use an authentication method that sends the password in cleartext. 2975 + */ 2976 + CF_EXPORT 2977 + const ODAuthenticationType kODAuthenticationTypeNodeNativeNoClearText; 2978 + 2979 + /*! 2980 + @const kODAuthenticationTypeReadSecureHash 2981 + @abstract Returns the SHA1 or Seeded SHA1 hash for a local user. 2982 + @discussion Returns the SHA1 or Seeded SHA1 hash for a local user 2983 + Only accessible by root processes. Only implemented by the local node. 2984 + 2985 + Authentication array has following items in order: 2986 + user's name in UTF8 encoding 2987 + 2988 + Continue items array contains: 2989 + value, either the old 20-byte SHA1 or the new seeded 24-byte SHA1. 2990 + */ 2991 + CF_EXPORT 2992 + const ODAuthenticationType kODAuthenticationTypeReadSecureHash; 2993 + 2994 + /*! 2995 + @const kODAuthenticationTypeSMBNTv2UserSessionKey 2996 + @abstract Generate the ntlm-v2 user session key. 2997 + @discussion Generate the ntlm-v2 user session key. Requires prior authentication with a trusted 2998 + authentication method. 2999 + 3000 + Authentication array has following items in order: 3001 + user name in UTF8 encoding, 3002 + 8 byte server challenge 3003 + client response buffer 3004 + */ 3005 + CF_EXPORT 3006 + const ODAuthenticationType kODAuthenticationTypeSMBNTv2UserSessionKey; 3007 + 3008 + /*! 3009 + @const kODAuthenticationTypeSMBWorkstationCredentialSessionKey 3010 + @abstract Generates an SMB workstation credential session key. 3011 + @discussion Generates an SMB workstation credential session key. 3012 + 3013 + Authentication array has following items in order: 3014 + user name in UTF8 encoding, 3015 + 8 byte server challenge + 8 byte client challenge 3016 + */ 3017 + CF_EXPORT 3018 + const ODAuthenticationType kODAuthenticationTypeSMBWorkstationCredentialSessionKey; 3019 + 3020 + /*! 3021 + @const kODAuthenticationTypeSMB_LM_Key 3022 + @abstract SMB Lan Manager authentication method. 3023 + @discussion SMB Lan Manager authentication method. 3024 + 3025 + Authentication array has following items in order: 3026 + user name in UTF8 encoding, 3027 + 8 byte server challenge, 3028 + 24 byte client response 3029 + */ 3030 + CF_EXPORT 3031 + const ODAuthenticationType kODAuthenticationTypeSMB_LM_Key; 3032 + 3033 + /*! 3034 + @const kODAuthenticationTypeSMB_NT_Key 3035 + @abstract SMB NT authentication method. 3036 + @discussion SMB NT authentication method. 3037 + 3038 + Authentication array has following items in order: 3039 + user name in UTF8 encoding, 3040 + 8 byte server challenge, 3041 + 24 byte client response 3042 + */ 3043 + CF_EXPORT 3044 + const ODAuthenticationType kODAuthenticationTypeSMB_NT_Key; 3045 + 3046 + /*! 3047 + @const kODAuthenticationTypeSMB_NT_UserSessionKey 3048 + @abstract Used by SMB to get session keys. 3049 + @discussion Used by SMB to get session keys 3050 + This authentication method is only implemented by the PasswordServer node. 3051 + 3052 + Authentication array has following items in order: 3053 + Password Server ID in UTF8 encoding 3054 + 3055 + Continue items array contains: 3056 + MD4( ntHash ) 3057 + */ 3058 + CF_EXPORT 3059 + const ODAuthenticationType kODAuthenticationTypeSMB_NT_UserSessionKey; 3060 + 3061 + /*! 3062 + @const kODAuthenticationTypeSMB_NT_WithUserSessionKey 3063 + @abstract Used by SMB to authenticate and get session keys. 3064 + @discussion Used by SMB to authenticate and get session keys 3065 + 3066 + Authentication array has following items in order: 3067 + user name in UTF8 encoding, 3068 + 8 byte server challenge, 3069 + 24 byte client response, 3070 + authenticator name in UTF8 encoding, 3071 + authenticator password in UTF8 encoding 3072 + 3073 + Continue items array contains: 3074 + MD4( ntHash ) 3075 + */ 3076 + CF_EXPORT 3077 + const ODAuthenticationType kODAuthenticationTypeSMB_NT_WithUserSessionKey; 3078 + 3079 + /*! 3080 + @const kODAuthenticationTypeSecureHash 3081 + @abstract Authentication specifically using the secure hash. 3082 + @discussion Authentication specifically using the secure hash. 3083 + 3084 + Authentication array has following items in order: 3085 + user name in UTF8 encoding, 3086 + salted SHA1 hash 3087 + */ 3088 + CF_EXPORT 3089 + const ODAuthenticationType kODAuthenticationTypeSecureHash __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_NA, __IPHONE_NA); 3090 + 3091 + /*! 3092 + @const kODAuthenticationTypeSetCertificateHashAsCurrent 3093 + @abstract Set certificate using the authenticated user's credentials. 3094 + @discussion Set certificate using the authenticated user's credentials. 3095 + 3096 + Authentication array has the following items in order: 3097 + user name in UTF8 encoding 3098 + hashed certificate data (40 hex characters) 3099 + */ 3100 + CF_EXPORT 3101 + const ODAuthenticationType kODAuthenticationTypeSetCertificateHashAsCurrent __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); 3102 + 3103 + /*! 3104 + @const kODAuthenticationTypeSetGlobalPolicy 3105 + @abstract Used to set the global policy. 3106 + @discussion Used to set the global policy. 3107 + 3108 + Authentication array has following items in order: 3109 + user name or Password Server ID in UTF8 encoding, 3110 + password in UTF8 encoding, 3111 + policy string in UTF8 encoding 3112 + */ 3113 + CF_EXPORT 3114 + const ODAuthenticationType kODAuthenticationTypeSetGlobalPolicy; 3115 + 3116 + /*! 3117 + @const kODAuthenticationTypeSetLMHash 3118 + @abstract Set the LAN Manager hash for an account. 3119 + @discussion Set the LAN Manager hash for an account. This method requires prior authentication. 3120 + Setting the LM hash for an account instead of the plain text password can cause the Windows 3121 + password to get out-of-sync with the password for other services. Therefore, this 3122 + authentication method should only be used when there is no other choice. 3123 + 3124 + Authentication array has following items in order: 3125 + user name in UTF8 encoding, 3126 + LAN Manager hash buffer 3127 + */ 3128 + CF_EXPORT 3129 + const ODAuthenticationType kODAuthenticationTypeSetLMHash; 3130 + 3131 + /*! 3132 + @const kODAuthenticationTypeSetNTHash 3133 + @abstract Set the NT hash for a user. 3134 + @discussion Set the NT hash for a user. This method requires prior authentication. 3135 + Setting the NT hash for an account instead of the plain text password can cause the Windows 3136 + password to get out-of-sync with the password for other services. Therefore, this 3137 + authentication method should only be used when there is no other choice. 3138 + 3139 + Authentication array has following items in order: 3140 + user name in UTF8 encoding, 3141 + NT hash buffer 3142 + */ 3143 + CF_EXPORT 3144 + const ODAuthenticationType kODAuthenticationTypeSetNTHash; 3145 + 3146 + /*! 3147 + @const kODAuthenticationTypeSetPassword 3148 + @abstract Set password method. 3149 + @discussion Set password method. 3150 + 3151 + Authentication array has following items in order: 3152 + user name in UTF8 encoding, 3153 + new password in UTF8 encoding, 3154 + authenticator's name in UTF8 encoding, 3155 + authenticator's password in UTF8 encoding 3156 + */ 3157 + CF_EXPORT 3158 + const ODAuthenticationType kODAuthenticationTypeSetPassword; 3159 + 3160 + /*! 3161 + @const kODAuthenticationTypeSetPasswordAsCurrent 3162 + @abstract Set password using the current credentials. 3163 + @discussion Set password using the current credentials. 3164 + 3165 + Authentication array has following items in order: 3166 + user name in UTF8 encoding, 3167 + new password in UTF8 encoding 3168 + */ 3169 + CF_EXPORT 3170 + const ODAuthenticationType kODAuthenticationTypeSetPasswordAsCurrent; 3171 + 3172 + /*! 3173 + @const kODAuthenticationTypeSetPolicy 3174 + @abstract The plug-in should determine which specific authentication method to use. 3175 + @discussion The plug-in should determine which specific authentication method to use. 3176 + 3177 + Authentication array has following items in order: 3178 + authenticator's name or Password Server ID in UTF8 encoding, 3179 + authenticator's password in UTF8 encoding, 3180 + name or Password Server ID of the target account in UTF8 encoding, 3181 + policy data 3182 + */ 3183 + CF_EXPORT 3184 + const ODAuthenticationType kODAuthenticationTypeSetPolicy; 3185 + 3186 + /*! 3187 + @const kODAuthenticationTypeSetPolicyAsCurrent 3188 + @abstract A set policy for the password server. 3189 + @discussion A set policy for the password server. 3190 + 3191 + Authentication array has following items in order: 3192 + user name or Password Server ID of the target account in UTF8 encoding, 3193 + policy data 3194 + */ 3195 + CF_EXPORT 3196 + const ODAuthenticationType kODAuthenticationTypeSetPolicyAsCurrent; 3197 + 3198 + /*! 3199 + @const kODAuthenticationTypeSetUserData 3200 + @abstract Used for Apple password server. 3201 + @discussion Used for Apple password server. 3202 + This authentication method is only implemented by the PasswordServer node. 3203 + 3204 + Authentication array has following items in order: 3205 + authenticator's Password Server ID in UTF8 encoding, 3206 + authenticator's password in UTF8 encoding, 3207 + Password Server ID in UTF8 encoding, 3208 + user data 3209 + */ 3210 + CF_EXPORT 3211 + const ODAuthenticationType kODAuthenticationTypeSetUserData; 3212 + 3213 + /*! 3214 + @const kODAuthenticationTypeSetUserName 3215 + @abstract Used for Apple password server. 3216 + @discussion Used for Apple password server. 3217 + This authentication method is only implemented by the PasswordServer node. 3218 + 3219 + Authentication array has following items in order: 3220 + authenticator's Password Server ID in UTF8 encoding, 3221 + authenticator's password in UTF8 encoding, 3222 + Password Server ID in UTF8 encoding, 3223 + user's short name in UTF8 encoding 3224 + */ 3225 + CF_EXPORT 3226 + const ODAuthenticationType kODAuthenticationTypeSetUserName; 3227 + 3228 + /*! 3229 + @const kODAuthenticationTypeSetWorkstationPassword 3230 + @abstract Supports PDC SMB interaction with DS. 3231 + @discussion Supports PDC SMB interaction with DS. 3232 + 3233 + Authentication array has following items in order: 3234 + workstation's Password Server ID in UTF8 encoding, 3235 + NT hash 3236 + */ 3237 + CF_EXPORT 3238 + const ODAuthenticationType kODAuthenticationTypeSetWorkstationPassword; 3239 + 3240 + /*! 3241 + @const kODAuthenticationTypeWithAuthorizationRef 3242 + @abstract Allows access to local directories as root with a valid AuthorizationRef. 3243 + @discussion Allows access to local directories as root with a valid AuthorizationRef. 3244 + 3245 + Authentication array has following items in order: 3246 + externalized AuthorizationRef 3247 + */ 3248 + CF_EXPORT 3249 + const ODAuthenticationType kODAuthenticationTypeWithAuthorizationRef; 3250 + 3251 + /*! 3252 + @const kODAuthenticationTypeWriteSecureHash 3253 + @abstract Supports ONLY a root process to be able to directly write the secure hash of a user record. 3254 + @discussion Supports ONLY a root process to be able to directly write the secure hash of a user record. 3255 + 3256 + Authentication array has following items in order: 3257 + user name in UTF8 encoding, 3258 + salted SHA1 hash 3259 + */ 3260 + CF_EXPORT 3261 + const ODAuthenticationType kODAuthenticationTypeWriteSecureHash; 3262 + 3263 + #pragma mark Policy Types 3264 + 3265 + /*! 3266 + @const kODPolicyTypePasswordCannotBeAccountName 3267 + @abstract Boolean signifying the password must not contain the name of the account. 3268 + @discussion Boolean signifying the password must not contain the name of the account. 3269 + */ 3270 + CF_EXPORT 3271 + const ODPolicyType kODPolicyTypePasswordCannotBeAccountName __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3272 + 3273 + /*! 3274 + @const kODPolicyTypePasswordChangeRequired 3275 + @abstract Boolean stating the password should be changed on next logon. 3276 + @discussion Should be set to a CFBooleanRef/NSNumber accordingly to signify the password should be changed at next logon. 3277 + */ 3278 + CF_EXPORT 3279 + const ODPolicyType kODPolicyTypePasswordChangeRequired __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3280 + 3281 + /*! 3282 + @const kODPolicyTypePasswordHistory 3283 + @abstract The number of previous passwords that will be remembered. 3284 + @discussion Should be set with a CFNumber/NSNumber accordingly with a range of 1 to 15 passwords. Remove this policy or 3285 + set to 0 if no history is tracked. 3286 + */ 3287 + CF_EXPORT 3288 + const ODPolicyType kODPolicyTypePasswordHistory __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3289 + 3290 + /*! 3291 + @const kODPolicyTypePasswordMinimumNumberOfCharacters 3292 + @abstract The minimum number of characters a password must contain. 3293 + @discussion A CFNumber/NSNumber signifying the minimum number of characters a password must contain. 3294 + */ 3295 + CF_EXPORT 3296 + const ODPolicyType kODPolicyTypePasswordMinimumNumberOfCharacters __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3297 + 3298 + /*! 3299 + @const kODPolicyTypePasswordMaximumNumberOfCharacters 3300 + @abstract The maximum number of characters a password can contain. 3301 + @discussion A CFNumber/NSNumber signifying the maximum number of characters a password can contain. 3302 + */ 3303 + CF_EXPORT 3304 + const ODPolicyType kODPolicyTypePasswordMaximumNumberOfCharacters __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3305 + 3306 + /*! 3307 + @const kODPolicyTypePasswordMaximumAgeInMinutes 3308 + @abstract Number of minutes before password must be changed. 3309 + @discussion The value for the policy should be a CFNumberRef/NSNumber accordingly. 3310 + */ 3311 + CF_EXPORT 3312 + const ODPolicyType kODPolicyTypePasswordMaximumAgeInMinutes __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3313 + 3314 + /*! 3315 + @const kODPolicyTypePasswordRequiresAlpha 3316 + @abstract Sets the number of alpha characters that must present in the password. 3317 + @discussion A CFNumber/NSNumber signifying the number of alpha characters [A-Z][a-z] that must be present in the password. 3318 + Note, not all modules will support this capability. If you exceed the module's capabilities, it will reset to 3319 + the maximum supported by that module. 3320 + */ 3321 + CF_EXPORT 3322 + const ODPolicyType kODPolicyTypePasswordRequiresAlpha __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3323 + 3324 + /*! 3325 + @const kODPolicyTypePasswordRequiresMixedCase 3326 + @abstract Boolean signifying if password requires mixed case characters both upper and lower characters. 3327 + @discussion Boolean signifying if password requires mixed case characters both upper and lower characters. 3328 + */ 3329 + CF_EXPORT 3330 + const ODPolicyType kODPolicyTypePasswordRequiresMixedCase __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3331 + 3332 + /*! 3333 + @const kODPolicyTypePasswordRequiresNumeric 3334 + @abstract Sets the number of numeric characters that must present in the password. 3335 + @discussion A CFNumber/NSNumber signifying the number of numeric characters [0-9] that must be present in the password. 3336 + Note, not all modules will support this capability. If you exceed the module's capabilities, it will reset to 3337 + the maximum supported by that module. 3338 + */ 3339 + CF_EXPORT 3340 + const ODPolicyType kODPolicyTypePasswordRequiresNumeric __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3341 + 3342 + /*! 3343 + @const kODPolicyTypePasswordRequiresSymbol 3344 + @abstract Sets the number of symbol characters that must present in the password. 3345 + @discussion A CFNumber/NSNumber signifying the number of symbol characters that must be present in the password. 3346 + Note, not all modules will support this capability. If you exceed the module's capabilities, it will reset to 3347 + the maximum supported by that module. 3348 + */ 3349 + CF_EXPORT 3350 + const ODPolicyType kODPolicyTypePasswordRequiresSymbol __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3351 + 3352 + /*! 3353 + @const kODPolicyTypePasswordSelfModification 3354 + @abstract Boolean stating if the account is allowed to change their own password. 3355 + @discussion Should be set to a CFBooleanRef/NSNumber accordingly to signify the if the account holder is allowed to change 3356 + their own password. 3357 + */ 3358 + CF_EXPORT 3359 + const ODPolicyType kODPolicyTypePasswordSelfModification __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3360 + 3361 + /*! 3362 + @const kODPolicyTypeAccountExpiresOnDate 3363 + @abstract Date when an account expires and becomes deactivated. 3364 + @discussion A CFDate/NSDate signifying when an account expires will be deactivated. 3365 + */ 3366 + CF_EXPORT 3367 + const ODPolicyType kODPolicyTypeAccountExpiresOnDate __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3368 + 3369 + /*! 3370 + @const kODPolicyTypeAccountMaximumFailedLogins 3371 + @abstract Sets the number of maximum failed logins allowed for the account. 3372 + @discussion A CFNumber/NSNumber signifying the number of times a bad password can be entered before the account is locked out. 3373 + */ 3374 + CF_EXPORT 3375 + const ODPolicyType kODPolicyTypeAccountMaximumFailedLogins __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3376 + 3377 + /*! 3378 + @const kODPolicyTypeAccountMaximumMinutesUntilDisabled 3379 + @abstract Sets the number of maximum number of minutes before this account is disabled automatically from password set. 3380 + @discussion A CFNumber/NSNumber signifying the number of minutes before the account should be auto-disabled. Note, 3381 + calculation of this is based on timestamp of the password, therefore also preventing the password from 3382 + being changed is required. 3383 + */ 3384 + CF_EXPORT 3385 + const ODPolicyType kODPolicyTypeAccountMaximumMinutesUntilDisabled __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3386 + 3387 + /*! 3388 + @const kODPolicyTypePasswordMinutesUntilFailedLoginReset 3389 + @abstract Number of minutes before an account locked out by bad passwords is automatically re-activated. 3390 + @discussion The value for the policy should be a CFNumberRef/NSNumber accordingly. 3391 + */ 3392 + CF_EXPORT 3393 + const ODPolicyType kODPolicyTypeAccountMinutesUntilFailedLoginReset __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3394 + 3395 + /*! 3396 + @const kODPolicyTypeMaximumMinutesOfNonUse 3397 + @abstract Maximum number of minutes that an account has not been used before it is deactivated. 3398 + @discussion A CFNumber/NSNumber signifying the number of minutes before an account has not been used before it is deactivated. 3399 + */ 3400 + CF_EXPORT 3401 + const ODPolicyType kODPolicyTypeAccountMaximumMinutesOfNonUse __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA); 3402 + 3403 + /*! 3404 + @enum Expiration constants 3405 + @abstract Special values that may be returned by ODRecordSecondsUntil*Expires(). 3406 + @constant kODExpirationTimeExpired indicates the password or authentication 3407 + has expired. 3408 + @constant kODExpirationTimeNeverExpires indicates the password or 3409 + authentication will never expire. 3410 + */ 3411 + enum { 3412 + kODExpirationTimeExpired = 0LL, 3413 + kODExpirationTimeNeverExpires = -1LL, 3414 + }; 3415 + 3416 + /*! 3417 + @typedef kODPolicyKeyType 3418 + @abstract Type for the keys in a policy dictionary. 3419 + @discussion Type for the keys in a policy dictionary. These are the 3420 + expected keys in a policy. Some keys are optional. For more 3421 + information see the the specific key. Some keys are used in 3422 + individual policies, others in a policy set. 3423 + */ 3424 + #ifdef __OBJC__ 3425 + typedef NSString *ODPolicyKeyType; 3426 + #else 3427 + typedef CFStringRef ODPolicyKeyType; 3428 + #endif 3429 + 3430 + /*! 3431 + @const kODPolicyKeyIdentifier 3432 + @abstract Key for the policy identifier in a policy dictionary. 3433 + @discussion Key for the policy identifier in a policy dictionary. Required 3434 + key in a policy dictionary. The value of this key is a string 3435 + that uniquely identifies the policy. It can be anything from a 3436 + GUID to a string that describes the policy (e.g. "max num chars"). 3437 + */ 3438 + CF_EXPORT 3439 + const ODPolicyKeyType kODPolicyKeyIdentifier __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3440 + 3441 + /*! 3442 + @const kODPolicyKeyParameters 3443 + @abstract Key for the policy parameters, if any, in a policy dictionary. 3444 + @discussion Key for the policy parameters, if any, in a policy dictionary. 3445 + Optional key in a policy dictionary. The value of this key is a 3446 + dictionary containing any parameters that are relevant to the 3447 + policy. Parameters may be used for information purposes or to 3448 + provide additional data to be used in the policy format string. 3449 + */ 3450 + CF_EXPORT 3451 + const ODPolicyKeyType kODPolicyKeyParameters __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3452 + 3453 + /*! 3454 + @const kODPolicyKeyContent 3455 + @abstract Key for the policy format string in a policy dictionary. 3456 + @discussion Key for the policy format string in a policy dictionary. 3457 + Required key in a policy dictionary. The value of this key is a 3458 + string containing the policy itself, from which a predicate will 3459 + be created. The predicate will be applied during policy 3460 + evaluation. 3461 + */ 3462 + CF_EXPORT 3463 + const ODPolicyKeyType kODPolicyKeyContent __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3464 + 3465 + 3466 + /*! 3467 + @typedef ODPolicyCategoryType 3468 + @abstract Type for the policy categories. 3469 + @discussion Type for the policy categories. Policy categories are also keys 3470 + in a policy set dictionary, where the value of each category is 3471 + an array of policy dictionaries. 3472 + */ 3473 + #ifdef __OBJC__ 3474 + typedef NSString *ODPolicyCategoryType; 3475 + #else 3476 + typedef CFStringRef ODPolicyCategoryType; 3477 + #endif 3478 + 3479 + /*! 3480 + @const kODPolicyCategoryAuthentication 3481 + @abstract Category for policies controlling when authentications are allowed. 3482 + @discussion Category for policies controlling when authentications are allowed. 3483 + Policies in this category are evaluated when determining if an 3484 + authentication should be allowed or when authentications will 3485 + expire. This constant is also used as a key in a policy set 3486 + dictionary with a value containing an array of policy 3487 + dictionaries. 3488 + */ 3489 + CF_EXPORT 3490 + ODPolicyCategoryType kODPolicyCategoryAuthentication __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3491 + 3492 + /*! 3493 + @const kODPolicyCategoryPasswordContent 3494 + @abstract Category for policies controlling content of passwords. 3495 + @discussion Category for policies controlling content of passwords. 3496 + Policies in this category are evaluated when determining if a 3497 + password contains the required content, which is typically done 3498 + during password changes. This constant is also used as a key in 3499 + a policy set dictionary with a value containing an array of 3500 + policy dictionaries. 3501 + */ 3502 + CF_EXPORT 3503 + ODPolicyCategoryType kODPolicyCategoryPasswordContent __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3504 + 3505 + /*! 3506 + @const kODPolicyCategoryPasswordChange 3507 + @abstract Category for policies controlling when password require changing. 3508 + @discussion Category for policies controlling when password require changing. 3509 + */ 3510 + CF_EXPORT 3511 + ODPolicyCategoryType kODPolicyCategoryPasswordChange __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3512 + 3513 + 3514 + /*! 3515 + @typedef kODPolicyAttributeType 3516 + @abstract Type for attributes that may be used in policies. 3517 + @discussion Type for attributes that may be used in policies. Policies in 3518 + this category will be evaluated when determining if an 3519 + authentication should be allowed or when determine when a 3520 + password will expire. This constant is also used as a key in a 3521 + policy set dictionary with a value containing an array of policy 3522 + dictionaries. 3523 + */ 3524 + #ifdef __OBJC__ 3525 + typedef NSString *ODPolicyAttributeType; 3526 + #else 3527 + typedef CFStringRef ODPolicyAttributeType; 3528 + #endif 3529 + 3530 + /*! 3531 + @const kODPolicyAttributeRecordName 3532 + @abstract Policy attribute for the record name. 3533 + @discussion Policy attribute for the record name. May be used in policies 3534 + to compare against other record attributes. For example, this 3535 + Password Content policy string prevents the password from being 3536 + the same as the record name: 3537 + [NSString stringWithFormat:@"%@ != %@", kODPolicyAttributeRecordName, kODPolicyAttributePassword]; 3538 + */ 3539 + CF_EXPORT 3540 + ODPolicyAttributeType kODPolicyAttributeRecordName __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3541 + 3542 + /*! 3543 + @const kODPolicyAttributeRecordType 3544 + @abstract Policy attribute for the record type. 3545 + @discussion Policy attribute for the record type. Could be used in policies 3546 + to tailor behavior for a particular record type. For example, 3547 + this Password Content policy string would require computer 3548 + passwords to be a minimum of 24 characters long: 3549 + [NSString stringWithFormat:@"%@ == %@ and %@ matches '.{24,}+'", 3550 + kODPolicyAttributeRecordType, kODRecordTypeComputer, 3551 + kODPolicyAttributePassword]; 3552 + */ 3553 + CF_EXPORT 3554 + ODPolicyAttributeType kODPolicyAttributeRecordType __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3555 + 3556 + 3557 + /*! 3558 + @const kODPolicyAttributePassword 3559 + @abstract Policy attribute for the password. 3560 + @discussion Policy attribute for the password in plain text. May be used in 3561 + policies to compare against other attributes or for evaluation 3562 + against regular expressions. Primarily useful in the Password 3563 + Content policies. For example, this policy string checks 3564 + whether the password length is at least 8 characters: 3565 + [NSString stringWithFormat:@"%@ matches '.{8,}+'", kODPolicyAttributePassword]; 3566 + */ 3567 + CF_EXPORT 3568 + ODPolicyAttributeType kODPolicyAttributePassword __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3569 + 3570 + /*! 3571 + @const kODPolicyAttributePasswordHashes 3572 + @abstract Policy attribute for the password hashes 3573 + @discussion Policy attribute for the password hashes. The value should be a 3574 + CFArray containing one or more CFData values representing a 3575 + password hash. 3576 + 3577 + Used in Password Content policy strings to compare the new 3578 + password against the password history, for example: 3579 + [NSString stringWithFormat:@"none %@ in %@", kODPolicyAttributePasswordHashes, kODPolicyAttributePasswordHistory]; 3580 + */ 3581 + CF_EXPORT 3582 + ODPolicyAttributeType kODPolicyAttributePasswordHashes __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3583 + 3584 + /*! 3585 + @const kODPolicyAttributePasswordHistory 3586 + @abstract Policy attribute for the list of previous password hashes 3587 + @discussion Policy attribute for the list of previous password hashes. The 3588 + value of this attribute is a CFArray containing one or more 3589 + CFData elements representing a hash of a previous password. 3590 + Hash types may be mixed. 3591 + 3592 + Used in Password Content policy strings to compare the new 3593 + password against the password history, for example: 3594 + [NSString stringWithFormat:@"none %@ in %@", kODPolicyAttributePasswordHashes, kODPolicyAttributePasswordHistory]; 3595 + */ 3596 + CF_EXPORT 3597 + ODPolicyAttributeType kODPolicyAttributePasswordHistory __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3598 + 3599 + /*! 3600 + @const kODPolicyAttributePasswordHistoryDepth 3601 + @abstract Policy attribute for the number of previous hashed passwords to keep. 3602 + @discussion Policy attribute for the number of previous hashed passwords to 3603 + keep. Should used as a key in the policy parameter dictionary, 3604 + with a CFNumber value, specifying the number of password to keep. 3605 + Should not be used in a policy string. 3606 + */ 3607 + CF_EXPORT 3608 + ODPolicyAttributeType kODPolicyAttributePasswordHistoryDepth __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3609 + 3610 + /*! 3611 + @const kODPolicyAttributeCurrentDate 3612 + @abstract Policy attribute for the current date and time as a CFDate. 3613 + @discussion Policy attribute for the current date and time as a CFDate used 3614 + in policy strings to compare the current date against another 3615 + date. The following policy string would allow authentications 3616 + until the expiration date: 3617 + [NSString stringWithFormat:@"%@ < %@", kODPolicyAttributeCurrentDate, kODPolicyAttributeExpiresOnDate]; 3618 + 3619 + Do not use kODPolicyAttributeCurrentDate in policies where date 3620 + arithmetic is needed; for those policies use 3621 + kODPolicyAttributeCurrentTime instead. 3622 + */ 3623 + CF_EXPORT 3624 + ODPolicyAttributeType kODPolicyAttributeCurrentDate __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3625 + 3626 + /*! 3627 + @const kODPolicyAttributeCurrentTime 3628 + @abstract Policy attribute for the current date and time in seconds. 3629 + @discussion Policy attribute for the current date and time in seconds since 3630 + the Unix epoch. Used in policy strings to compare the 3631 + current time against other times. Suitable for use in policies 3632 + where "date arithmetic" is needed (i.e. adding/subtracting 3633 + values to/from the current time or another time in seconds). 3634 + Ensure all times and date arithmetic in the policy are specified 3635 + in seconds. 3636 + 3637 + Note that kODPolicyAttributeExpiresEveryNDays needs to be 3638 + converted to seconds to match the units of the other times. The 3639 + special keyword DAYS_TO_SECONDS can be used to accomplish this. 3640 + 3641 + In the policy below, password changes are required every 90 days 3642 + (kODPolicyAttributeExpiresEveryNDays = 90). 3643 + 3644 + [NSString stringWithFormat:@"%@ < %@ + (%@ * DAYS_TO_SECONDS)", 3645 + kODPolicyAttributeCurrentTime, 3646 + kODPolicyAttributeLastPasswordChangeTime, 3647 + kODPolicyAttributeExpiresEveryNDays]; 3648 + */ 3649 + CF_EXPORT 3650 + ODPolicyAttributeType kODPolicyAttributeCurrentTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3651 + 3652 + /*! 3653 + @const kODPolicyAttributeCurrentTimeOfDay 3654 + @abstract Policy attribute for the current time of day as a CFNumber. 3655 + @discussion Policy attribute for the current time of day as a CFNumber, in 3656 + 24 hour time, i.e. the range is 0000 through 2359. Does not 3657 + contain any date information. 3658 + 3659 + This attribute is used in policies to compare the current time 3660 + of day against another time of day. For example, to allow 3661 + authentications between the hours of 8:00 AM and 5:00 PM, the 3662 + policy string would be (kODPolicyAttributeEnableAtTimeOfDay is 3663 + set to 0800 and kODPolicyAttributeExpiresAtTimeOfDay is 1700): 3664 + [NSString stringWithFormat:@"%@ > %@ and %@ < %@", 3665 + kODPolicyAttributeCurrentTimeOfDay, 3666 + kODPolicyAttributeEnableAtTimeOfDay, 3667 + kODPolicyAttributeCurrentTimeOfDay, 3668 + kODPolicyAttributeExpiresAtTimeOfDay]; 3669 + */ 3670 + CF_EXPORT 3671 + ODPolicyAttributeType kODPolicyAttributeCurrentTimeOfDay __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3672 + 3673 + /*! 3674 + @const kODPolicyAttributeCurrentDayOfWeek 3675 + @abstract Policy attribute for the current day of the week, as a CFNumber. 3676 + @discussion Policy attribute for the current day of the week, as a CFNumber. 3677 + Specified in units appropriate for the local calendar. The 3678 + range is 1 through 7, with 1 representing the first day of the 3679 + week in the local calendar, and 7 representing the last day of 3680 + the week. 3681 + 3682 + This attribute is used in policies to compare the current day of 3683 + the week against another day of the week. For example, to 3684 + enable authentications on Monday through Friday, the policy 3685 + would be (kODPolicyAttributeEnableOnDayOfWeek is set to the 3686 + number for Monday and kODPolicyAttributeExpiresOnDayOfWeek is 3687 + set to the number for Friday): 3688 + [NSString stringWithFormat:@"%@ > %@ and %@ < %@", 3689 + kODPolicyAttributeCurrentDayOfWeek, 3690 + kODPolicyAttributeEnableOnDayOfWeek, 3691 + kODPolicyAttributeCurrentDayOfWeek, 3692 + kODPolicyAttributeExpiresOnDayOfWeek]; 3693 + */ 3694 + CF_EXPORT 3695 + ODPolicyAttributeType kODPolicyAttributeCurrentDayOfWeek __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3696 + 3697 + /*! 3698 + @const kODPolicyAttributeFailedAuthentications 3699 + @abstract Policy attribute for the number of failed authentications. 3700 + @discussion Policy attribute for the number of failed authentications for 3701 + the record. Used in policies to compare against the maximum 3702 + failed authentications. The following policy would deny further 3703 + authentications after 3 failed attempts (assumes 3704 + kODPolicyAttributeMaximumFailedAuthentications is 3): 3705 + [NSString stringWithFormat:@"%@ < %@", 3706 + kODPolicyAttributeFailedAuthentications, 3707 + kODPolicyAttributeMaximumFailedAuthentications]; 3708 + */ 3709 + CF_EXPORT 3710 + ODPolicyAttributeType kODPolicyAttributeFailedAuthentications __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3711 + 3712 + /*! 3713 + @const kODPolicyAttributeMaximumFailedAuthentications 3714 + @abstract Policy attribute for the maximum failed authentication attempts. 3715 + @discussion Policy attribute for the maximum failed authentication attempts. 3716 + Used as a key in policy parameter dictionary to specify the 3717 + maximum allowable failed authentication attempts with a CFNumber 3718 + value. Also used in the policy string to compare against the 3719 + number of failed authentication attempts. This policy would 3720 + disallow authentications after 3 failed attempts: 3721 + @{ kODPolicyKeyIdentifier : @"maximum failed authentications", 3722 + kODPolicyKeyParameters : @{ kODPolicyAttributeMaximumFailedAuthentications : @3 }, 3723 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@", 3724 + kODPolicyAttributeFailedAuthentications, 3725 + kODPolicyAttributeMaximumFailedAuthentications] }; 3726 + */ 3727 + CF_EXPORT 3728 + ODPolicyAttributeType kODPolicyAttributeMaximumFailedAuthentications __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3729 + 3730 + /*! 3731 + @const kODPolicyAttributeLastFailedAuthenticationTime 3732 + @abstract Policy attribute for the time of the last failed auth attempt. 3733 + @discussion Policy attribute for the time of the last failed auth attempt. 3734 + CFNumber with a value representing the the number of seconds 3735 + since the Unix epoch. Used in policies to compare against other 3736 + times. As an example, this policy string would prevent another 3737 + authentication within 10 seconds of a failed authentication: 3738 + [NSString stringWithFormat:@"%@ > %@ + 10", 3739 + kODPolicyAttributeCurrentTime, 3740 + kODPolicyAttributeLastFailedAuthenticationTime]; 3741 + */ 3742 + CF_EXPORT 3743 + ODPolicyAttributeType kODPolicyAttributeLastFailedAuthenticationTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3744 + 3745 + /*! 3746 + @const kODPolicyAttributeLastAuthenticationTime 3747 + @abstract Policy attribute for the time of the last successful auth attempt. 3748 + @discussion Policy attribute for the time of the last successful auth attempt. 3749 + CFNumber with a value representing the number of seconds since 3750 + the Unix epoch. Used in policies to compare against another 3751 + time. 3752 + 3753 + The sample policy string below would deny authentications if 3754 + there have been no authentications in the last 90 days. 3755 + 3756 + Note that the number of days needs to be converted to seconds to 3757 + match the units of kODPolicyAttributeCurrentTime. The special 3758 + keyword DAYS_TO_SECONDS can be used for the conversion. 3759 + 3760 + [NSString stringWithFormat:@"%@ < %@ + 90 * DAYS_TO_SECONDS", 3761 + kODPolicyAttributeCurrentTime, 3762 + kODPolicyAttributeLastAuthenticationTime]; 3763 + */ 3764 + CF_EXPORT 3765 + ODPolicyAttributeType kODPolicyAttributeLastAuthenticationTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3766 + 3767 + /*! 3768 + @const kODPolicyAttributeLastPasswordChangeTime 3769 + @abstract Policy attribute for time of the last password change. 3770 + @discussion Policy attribute for time of the last password change. The time 3771 + is specified as the number of seconds since the Unix epoch. 3772 + Used in policies to compare against other times. Typically 3773 + would be used in Password Change policies to expire a password 3774 + at a certain time or interval. 3775 + 3776 + The policy string below requires a password change every 90 days 3777 + (kODPolicyAttributeExpiresEveryNDays is set to 90). 3778 + 3779 + Note that kODPolicyAttributeExpiresEveryNDays needs to be 3780 + converted to seconds to match the units of the other times. The 3781 + special keyword DAYS_TO_SECONDS can be used for the conversion. 3782 + 3783 + [NSString stringWithFormat:@"%@ < %@ + %@ * DAYS_TO_SECONDS", 3784 + kODPolicyAttributeCurrentTime, 3785 + kODPolicyAttributeLastPasswordChangeTime, 3786 + kODPolicyAttributeExpiresEveryNDays]; 3787 + */ 3788 + CF_EXPORT 3789 + ODPolicyAttributeType kODPolicyAttributeLastPasswordChangeTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3790 + 3791 + /*! 3792 + @const kODPolicyAttributeNewPasswordRequiredTime 3793 + @abstract Policy attribute for the time when "new password required" was set. 3794 + @discussion Policy attribute for the time when "new password required" was set. 3795 + The time is specified as the number of seconds since the 3796 + Unix epoch. 3797 + 3798 + This attribute may be used in the policy string. Whenever it's 3799 + used in the policy string, it must also be specified in the 3800 + policy's parameter dictionary. 3801 + 3802 + This attribute is used to capture the time when the system 3803 + administrator wants to force all users to change their 3804 + passwords. This would be a "one-time" change, i.e. once the 3805 + user changed the password, the policy would apply. The policy 3806 + would have to be updated with a new time for 3807 + kODPolicyAttributeNewPasswordRequiredTime in order to force a 3808 + new round of password changes. 3809 + 3810 + For example: 3811 + @{ kODPolicyKeyIdentifier : @"change on next auth", 3812 + kODPolicyKeyParameters : @{ kODPolicyAttributeNewPasswordRequiredTime : @(<time>) }, 3813 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@", 3814 + kODPolicyAttributeLastPasswordChangeTime, 3815 + kODPolicyAttributeNewPasswordRequiredTime]}; 3816 + */ 3817 + CF_EXPORT 3818 + ODPolicyAttributeType kODPolicyAttributeNewPasswordRequiredTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3819 + 3820 + /*! 3821 + @const kODPolicyAttributeCreationTime 3822 + @abstract Policy attribute for the record creation time. 3823 + @discussion Policy attribute for the record creation time. The time is 3824 + specified as the number of seconds since the "reference date". 3825 + Could be used to disable "temporary" accounts after a specific 3826 + period of time. 3827 + 3828 + The example below disables authentications after 10 3829 + days after the account was created. 3830 + 3831 + Note that kODPolicyAttributeDaysUntilExpiration must be 3832 + converted to seconds to match the units of the other times. The 3833 + special keyword DAYS_TO_SECONDS can be used for the conversion. 3834 + 3835 + @{ kODPolicyKeyIdentifier : @"expires after 10 days", 3836 + kODPolicyKeyParameters : @{kODPolicyAttributeDaysUntilExpiration : @10 }, 3837 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@ + (%@ * DAYS_TO_SECONDS)", 3838 + kODPolicyAttributeCurrentTime, 3839 + kODPolicyAttributeCreationTime, 3840 + kODPolicyAttributeDaysUntilExpiration]}; 3841 + */ 3842 + CF_EXPORT 3843 + ODPolicyAttributeType kODPolicyAttributeCreationTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3844 + 3845 + /*! 3846 + @const kODPolicyAttributeExpiresEveryNDays 3847 + @abstract Policy attribute for expires every N days. 3848 + @discussion Policy attribute for expires every N days. This attribute is 3849 + used as a key in the policy parameter dictionary, with CFNumber 3850 + value. Also used in the policy strings. Typically would be used 3851 + in Password Change policies to expire a password at a certain 3852 + time or interval. 3853 + 3854 + The example policy below would require a password change every 3855 + 90 days. 3856 + 3857 + Note that kODPolicyAttributeExpiresEveryNDays needs to be 3858 + converted to seconds to match the units of the other times used 3859 + in the policy. The special keyword DAYS_TO_SECONDS can be used 3860 + for the conversion. 3861 + 3862 + @{ kODPolicyKeyIdentifier : @"expires every 90 days", 3863 + kODPolicyKeyParameters : @{ kODPolicyAttributeExpiresEveryNDays : @90 }, 3864 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@ + %@ * DAYS_TO_SECONDS", 3865 + kODPolicyAttributeCurrentTime, 3866 + kODPolicyAttributeLastPasswordChangeTime, 3867 + kODPolicyAttributeExpiresEveryNDays]}; 3868 + */ 3869 + CF_EXPORT 3870 + ODPolicyAttributeType kODPolicyAttributeExpiresEveryNDays __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3871 + 3872 + /*! 3873 + @const kODPolicyAttributeEnableOnDate 3874 + @abstract Policy attribute for the "enable on" date. 3875 + @discussion Policy attribute for the "enable on" date. Used as a key in the 3876 + policy parameter dictionary, with a CFDate value. Also used in 3877 + policy strings. The date is specified as a CFDate representing a 3878 + fixed date, appropriate for the locale. Use in policies when 3879 + comparing other date-based attributes. 3880 + 3881 + This attribute is typically used Authentication policies to 3882 + control when authentications are allowed. This policy would 3883 + enable authentications on Jan 1, 2014 (assumes the date 3884 + formatter is properly configured for the locale): 3885 + @{ kODPolicyKeyIdentifier : @"enable on Jan 1", 3886 + kODPolicyKeyParameters : @{ kODPolicyAttributeEnableOnDate : [localFormatter dateWithString:@"01/01/2014"] }, 3887 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ >= %@", 3888 + kODPolicyAttributeCurrentDate, 3889 + kODPolicyAttributeEnableOnDate]}; 3890 + */ 3891 + CF_EXPORT 3892 + ODPolicyAttributeType kODPolicyAttributeEnableOnDate __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3893 + 3894 + /*! 3895 + @const kODPolicyAttributeExpiresOnDate 3896 + @abstract Policy attribute for the "expires on" date. 3897 + @discussion Policy attribute for the "expires on" date. Used as a key in the 3898 + policy parameter dictionary, with a CFDate value. Also used in 3899 + policy strings. The date is specified as a CFDate representing a 3900 + fixed date, appropriate for the locale. Use in policies when 3901 + comparing other date-based attributes. 3902 + 3903 + This attribute is typically used in Authentication policies to 3904 + control when authentications are allowed. This policy would 3905 + disallow authentications on Jan 1, 2014 (assumes the date 3906 + formatter is properly configured for the locale): 3907 + @{ kODPolicyKeyIdentifier : @"expires on Jan 1", 3908 + kODPolicyKeyParameters : @{ kODPolicyAttributeExpiresOnDate : [localFormatter dateWithString:@"01/01/2014"] }, 3909 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@", 3910 + kODPolicyAttributeCurrentDate, 3911 + kODPolicyAttributeExpiresOnDate]}; 3912 + */ 3913 + CF_EXPORT 3914 + ODPolicyAttributeType kODPolicyAttributeExpiresOnDate __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3915 + 3916 + /*! 3917 + @const kODPolicyAttributeEnableOnDayOfWeek 3918 + @abstract Policy attribute for enable on a day of the week. 3919 + @discussion Policy attribute for enable on a day of the week. Specified as a 3920 + in units appropriate for the local calendar. The range is 1 3921 + through 7, with 1 representing the first day of the week in the 3922 + local calendar, and 7 representing the last day of the week. 3923 + 3924 + This attribute is used as a key in the policy parameter 3925 + dictionary, with a CFNumber value, and in policy strings. 3926 + Typically used i policy strings to compare against the another 3927 + day of the week. For example, to allow authentications only on 3928 + Monday through Friday, the policy would be (assumes Monday = 2 3929 + and Friday = 6 in the local calendar): 3930 + @{ kODPolicyKeyIdentifier : @"mon-fri only", 3931 + kODPolicyKeyParameters : @{ kODPolicyAttributeEnableOnDayOfWeek : @2, 3932 + kODPolicyAttributeExpiresOnDayOfWeek : @6 }, 3933 + kOPolicyKeyPolicy : [NSString stringWithFormat:@"%@ > %@ and %@ < %@", 3934 + kODPolicyAttributeCurrentDayOfWeek, 3935 + kODPolicyAttributeEnableOnDayOfWeek, 3936 + kODPolicyAttributeCurrentDayOfWeek, 3937 + kODPolicyAttributeExpiresOnDayOfWeek]}; 3938 + */ 3939 + CF_EXPORT 3940 + ODPolicyAttributeType kODPolicyAttributeEnableOnDayOfWeek __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3941 + 3942 + /*! 3943 + @const kODPolicyAttributeExpiresOnDayOfWeek 3944 + @abstract Policy attribute for expires on a day of the week. 3945 + @discussion Policy attribute for expires on a day of the week. Specified as a 3946 + in units appropriate for the local calendar. The range is 1 3947 + through 7, with 1 representing the first day of the week in the 3948 + local calendar, and 7 representing the last day of the week. 3949 + 3950 + This attribute is used as a key in the policy parameter 3951 + dictionary, with a CFNumber value, and in policy strings. 3952 + Typically used i policy strings to compare against the another 3953 + day of the week. See the example above for kODPolicyAttributeEnableOnDayOfWeek. 3954 + */ 3955 + CF_EXPORT 3956 + ODPolicyAttributeType kODPolicyAttributeExpiresOnDayOfWeek __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3957 + 3958 + /*! 3959 + @const kODPolicyAttributeEnableAtTimeOfDay 3960 + @abstract Policy attribute for enable at a specific time of day. 3961 + @discussion Policy attribute for enable at a specific time of day. 3962 + The time is specified in 24-hour time, with a range of 0000 3963 + through 2359. This attribute can be used as a key in the policy 3964 + parameter dictionary, with a CFNumber value, and in the policy 3965 + strings. 3966 + 3967 + Typically used in authentication policies to control specific 3968 + times of when when authentications are allowed. For example, to 3969 + enable authentications between the hours of 8:00 AM and 5:00 PM, 3970 + the policy would be: 3971 + @{ kODPolicyKeyIdentifier : @"school hours", 3972 + kODPolicyKeyParameters : @{ kODPolicyAttributeEnableAtTimeOfDay : @800, 3973 + kODPolicyAttributeExpiresAtTimeOfDay : @1700 }, 3974 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ > %@ and %@ < %@", 3975 + kODPolicyAttributeCurrentTimeOfDay, 3976 + kODPolicyAttributeEnableAtTimeOfDay, 3977 + kODPolicyAttributeCurrentTimeOfDay, 3978 + kODPolicyAttributeExpiresAtTimeOfDay]}; 3979 + */ 3980 + CF_EXPORT 3981 + ODPolicyAttributeType kODPolicyAttributeEnableAtTimeOfDay __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3982 + 3983 + /*! 3984 + @const kODPolicyAttributeExpiresAtTimeOfDay 3985 + @abstract Policy attribute for expires at a specific time of day. 3986 + @discussion Policy attribute for expires at a specific time of day. 3987 + The time is specified in 24-hour time, with a range of 0000 3988 + through 2359. This attribute can be used as a key in the policy 3989 + parameter dictionary, with a CFNumber value, and in the policy 3990 + strings. 3991 + 3992 + Typically used in authentication policies to control specific 3993 + times of when when authentications are allowed. See the example 3994 + above for kODPolicyAttributeEnableAtTimeOfDay. 3995 + */ 3996 + CF_EXPORT 3997 + ODPolicyAttributeType kODPolicyAttributeExpiresAtTimeOfDay __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 3998 + 3999 + 4000 + /*! 4001 + @const kODPolicyAttributeDaysUntilExpiration 4002 + @abstract Policy attribute for the number of days until expiration. 4003 + @discussion Policy attribute for the number of days until expiration. 4004 + This attribute can be used as a key in the policy parameter 4005 + dictionary with a CFNumber value representing some number of 4006 + days. It can also be used in the policy strings. 4007 + 4008 + May be used in Authentication policies to expire authentications 4009 + after some number of days or in Password Change policies to 4010 + expire passwords. 4011 + 4012 + The example below disables authentications after 10 4013 + days after the account was created. 4014 + 4015 + Note that kODPolicyAttributeDaysUntilExpiration must be 4016 + converted to seconds to match the units of the other times. The 4017 + special keyword DAYS_TO_SECONDS can be used for the conversion. 4018 + 4019 + @{ kODPolicyKeyIdentifier : @"expires after 10 days", 4020 + kODPolicyKeyParameters : @{kODPolicyAttributeDaysUntilExpiration : @10 }, 4021 + kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@ + (%@ * DAYS_TO_SECONDS)", 4022 + kODPolicyAttributeCurrentTime, 4023 + kODPolicyAttributeCreationTime, 4024 + kODPolicyAttributeDaysUntilExpiration]}; 4025 + */ 4026 + CF_EXPORT 4027 + ODPolicyAttributeType kODPolicyAttributeDaysUntilExpiration __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 4028 + 4029 + 4030 + #pragma mark Errors 4031 + 4032 + /*! 4033 + @enum ODFrameworkErrors 4034 + @abstract Errors specific to the framework and to underlying calls 4035 + @discussion Errors specific to the framework and to underlying calls 4036 + @constant kODErrorSuccess is when operation was successful (if appropriate) 4037 + @constant kODErrorSessionLocalOnlyDaemonInUse is when a Local Only session was initiated and is still active 4038 + @constant kODErrorSessionNormalDaemonInUse is when the Normal daemon is still in use but request was issued for Local only 4039 + @constant kODErrorSessionDaemonNotRunning is when the daemon is not running 4040 + @constant kODErrorSessionDaemonRefused is when the daemon refused the session 4041 + @constant kODErrorSessionProxyCommunicationError is when there was a communication error with the remote daemon 4042 + @constant kODErrorSessionProxyVersionMismatch is when versions mismatch between the remote daemon and local framework 4043 + @constant kODErrorSessionProxyIPUnreachable is when the provided kODSessionProxyAddress did not respond 4044 + @constant kODErrorSessionProxyUnknownHost is when the provided kODSessionProxyAddress cannot be resolved 4045 + @constant kODErrorNodeUnknownName is when the node name provided does not exist and cannot be opened 4046 + @constant kODErrorNodeUnknownType is when the node type provided is not a known value 4047 + @constant kODErrorNodeConnectionFailed is when a node connection failed (commonly server closed connection, etc.) 4048 + @constant kODErrorNodeUnknownHost is when an invalid host is provided 4049 + @constant kODErrorQuerySynchronize is an error code that is returned when a synchronize has been initiated 4050 + @constant kODErrorQueryInvalidMatchType is when an invalid match type is provided in a query 4051 + @constant kODErrorQueryUnsupportedMatchType is when plugin does not support the requirested match type 4052 + @constant kODErrorQueryTimeout is when a query timed out during request 4053 + @constant kODErrorRecordReadOnlyNode is when a record cannot be modified 4054 + @constant kODErrorRecordPermissionError is when the changes requested were denied due to insufficient permissions 4055 + @constant kODErrorRecordParameterError is when an invalid parameter was provided 4056 + @constant kODErrorRecordInvalidType is when an invalid record type was provided 4057 + @constant kODErrorRecordAlreadyExists is when a record create failed because the record already exists 4058 + @constant kODErrorRecordTypeDisabled is when a particular record type is disabled by policy for a plugin 4059 + @constant kODErrorRecordAttributeUnknownType is when an unknown attribute type is provided 4060 + @constant kODErrorRecordAttributeNotFound is when an attribute requested is not found in the record 4061 + @constant kODErrorRecordAttributeValueSchemaError is when an attribute value does not meet schema requirements 4062 + @constant kODErrorRecordAttributeValueNotFound is when an attribute value is not found in a record 4063 + @constant kODErrorCredentialsInvalid is when credentials provided are invalid with the current node 4064 + @constant kODErrorCredentialsMethodNotSupported is when a particular extended method is not supported by the node 4065 + @constant kODErrorCredentialsNotAuthorized is when an operation such as changing a password is not authorized with current privileges 4066 + @constant kODErrorCredentialsParameterError is when a parameter provided is invalid 4067 + @constant kODErrorCredentialsOperationFailed is when the requested operation failed (usually due to some unrecoverable error) 4068 + @constant kODErrorCredentialsServerUnreachable is when the authententication server is not reachabable 4069 + @constant kODErrorCredentialsServerNotFound is when the authentication server could not be found for the operation requested 4070 + @constant kODErrorCredentialsServerError is when the authentication server encountered an error 4071 + @constant kODErrorCredentialsServerTimeout is when the authentication server timed out 4072 + @constant kODErrorCredentialsContactMaster is when the authentication server is not the master and the operation requires the master 4073 + @constant kODErrorCredentialsServerCommunicationError is when the authentication server had a communications error 4074 + @constant kODErrorCredentialsAccountNotFound is when the authentication server could not find the account provided 4075 + @constant kODErrorCredentialsAccountDisabled is when the account is disabled 4076 + @constant kODErrorCredentialsAccountExpired is when the account is expired 4077 + @constant kODErrorCredentialsAccountInactive is when the account is inactive 4078 + @constant kODErrorCredentialsPasswordExpired is when the password has expired and must be changed 4079 + @constant kODErrorCredentialsPasswordChangeRequired is when a password change is required 4080 + @constant kODErrorCredentialsPasswordQualityFailed is when a password provided for change did not meet quality minimum requirements 4081 + @constant kODErrorCredentialsPasswordTooShort is when a password provided is too short 4082 + @constant kODErrorCredentialsPasswordTooLong is when a password provided is too long 4083 + @constant kODErrorCredentialsPasswordNeedsLetter is when a password needs a letter 4084 + @constant kODErrorCredentialsPasswordNeedsDigit is when a password needs a digit 4085 + @constant kODErrorCredentialsPasswordChangeTooSoon is when a an attempt to change a password too soon before last change 4086 + @constant kODErrorCredentialsPasswordUnrecoverable is when password was not recoverable from the authentication database 4087 + @constant kODErrorCredentialsInvalidLogonHours is when an account attempts to login outside of set logon hours 4088 + @constant kODErrorCredentialsInvalidComputer is when an account attempts to login to a computer they are not authorized 4089 + @constant kODErrorPolicyUnsupported all requested policies were not supported 4090 + @constant kODErrorPolicyOutOfRange policy value was beyond the allowed range 4091 + @constant kODErrorPluginOperationNotSupported is when a plugin does not support the requested operation 4092 + @constant kODErrorPluginError is when a plugin has encountered some undefined error 4093 + @constant kODErrorDaemonError is when some error occurred inside the daemon 4094 + @constant kODErrorPluginOperationTimeout is when an operation exceeds an imposed timeout 4095 + */ 4096 + 4097 + enum ODFrameworkErrors 4098 + { 4099 + kODErrorSuccess = 0, 4100 + 4101 + /* ODSession error codes */ 4102 + kODErrorSessionLocalOnlyDaemonInUse = 1000, 4103 + kODErrorSessionNormalDaemonInUse = 1001, 4104 + kODErrorSessionDaemonNotRunning = 1002, 4105 + kODErrorSessionDaemonRefused = 1003, 4106 + 4107 + kODErrorSessionProxyCommunicationError = 1100, 4108 + kODErrorSessionProxyVersionMismatch = 1101, 4109 + kODErrorSessionProxyIPUnreachable = 1102, 4110 + kODErrorSessionProxyUnknownHost = 1103, 4111 + 4112 + /* ODNode error codes */ 4113 + kODErrorNodeUnknownName = 2000, 4114 + kODErrorNodeUnknownType = 2001, 4115 + kODErrorNodeDisabled = 2002, 4116 + 4117 + kODErrorNodeConnectionFailed = 2100, 4118 + 4119 + /* ODNode miscellaneous error codes */ 4120 + kODErrorNodeUnknownHost = 2200, 4121 + 4122 + /* ODQuery error codes */ 4123 + kODErrorQuerySynchronize = 3000, 4124 + 4125 + kODErrorQueryInvalidMatchType = 3100, 4126 + kODErrorQueryUnsupportedMatchType = 3101, 4127 + kODErrorQueryTimeout = 3102, 4128 + 4129 + /* ODRecord error codes */ 4130 + kODErrorRecordReadOnlyNode = 4000, 4131 + kODErrorRecordPermissionError = 4001, 4132 + 4133 + kODErrorRecordParameterError = 4100, 4134 + kODErrorRecordInvalidType = 4101, 4135 + kODErrorRecordAlreadyExists = 4102, 4136 + kODErrorRecordTypeDisabled = 4103, 4137 + kODErrorRecordNoLongerExists = 4104, 4138 + 4139 + kODErrorRecordAttributeUnknownType = 4200, 4140 + kODErrorRecordAttributeNotFound = 4201, 4141 + kODErrorRecordAttributeValueSchemaError = 4202, 4142 + kODErrorRecordAttributeValueNotFound = 4203, 4143 + 4144 + /* Credential specific error codes */ 4145 + kODErrorCredentialsInvalid = 5000, 4146 + 4147 + kODErrorCredentialsMethodNotSupported = 5100, 4148 + kODErrorCredentialsNotAuthorized = 5101, 4149 + kODErrorCredentialsParameterError = 5102, 4150 + kODErrorCredentialsOperationFailed = 5103, 4151 + 4152 + kODErrorCredentialsServerUnreachable = 5200, 4153 + kODErrorCredentialsServerNotFound = 5201, 4154 + kODErrorCredentialsServerError = 5202, 4155 + kODErrorCredentialsServerTimeout = 5203, 4156 + kODErrorCredentialsContactMaster = 5204, 4157 + kODErrorCredentialsServerCommunicationError = 5205, 4158 + 4159 + kODErrorCredentialsAccountNotFound = 5300, 4160 + kODErrorCredentialsAccountDisabled = 5301, 4161 + kODErrorCredentialsAccountExpired = 5302, 4162 + kODErrorCredentialsAccountInactive = 5303, 4163 + 4164 + kODErrorCredentialsPasswordExpired = 5400, 4165 + kODErrorCredentialsPasswordChangeRequired = 5401, 4166 + kODErrorCredentialsPasswordQualityFailed = 5402, 4167 + kODErrorCredentialsPasswordTooShort = 5403, 4168 + kODErrorCredentialsPasswordTooLong = 5404, 4169 + kODErrorCredentialsPasswordNeedsLetter = 5405, 4170 + kODErrorCredentialsPasswordNeedsDigit = 5406, 4171 + kODErrorCredentialsPasswordChangeTooSoon = 5407, 4172 + kODErrorCredentialsPasswordUnrecoverable = 5408, 4173 + 4174 + kODErrorCredentialsInvalidLogonHours = 5500, 4175 + kODErrorCredentialsInvalidComputer = 5501, 4176 + 4177 + /* Policy errors */ 4178 + kODErrorPolicyUnsupported = 6000, 4179 + kODErrorPolicyOutOfRange = 6001, 4180 + 4181 + /* Underlying plugin errors */ 4182 + kODErrorPluginOperationNotSupported = 10000, 4183 + kODErrorPluginError = 10001, 4184 + kODErrorDaemonError = 10002, 4185 + kODErrorPluginOperationTimeout = 10003, 4186 + }; 4187 + 4188 + #endif
+24
src/OpenDirectory/Headers/NSOpenDirectory.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <OpenDirectory/OpenDirectory.h>
+100
src/OpenDirectory/Headers/ODAttributeMap.h
··· 1 + /* 2 + * Copyright (c) 2012 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <Foundation/Foundation.h> 25 + 26 + NS_CLASS_AVAILABLE(10_9, NA) 27 + @interface ODAttributeMap : NSObject { 28 + @protected 29 + NSString *customQueryFunction; 30 + NSString *customTranslationFunction; 31 + NSArray *customAttributes; 32 + NSString *value; 33 + } 34 + 35 + /* 36 + * Custom functions are in the format of: 37 + * "<module>:<function>" 38 + * 39 + * Example: "ldap:query_attribute" 40 + */ 41 + 42 + /* Custom function to be used when querying the attribute */ 43 + @property(copy) NSString *customQueryFunction NS_AVAILABLE_MAC(10_9); 44 + 45 + /* Custom function to be used when translating the result for the client */ 46 + @property(copy) NSString *customTranslationFunction NS_AVAILABLE_MAC(10_9); 47 + 48 + /* Attributes required for the custom functions */ 49 + @property(copy) NSArray *customAttributes NS_AVAILABLE_MAC(10_9); 50 + 51 + /* The value used for the mapping. Static, variable substitution and native are all represented */ 52 + @property(copy) NSString *value NS_AVAILABLE_MAC(10_9); 53 + 54 + /*! 55 + * @method attributeMapWithValue: 56 + * 57 + * @abstract 58 + * Returns an initialized and autoreleased ODAttributeMap object with the given value mapped. 59 + * 60 + * @discussion 61 + * Returns an initialized and autoreleased ODAttributeMap object with the given value mapped. 62 + */ 63 + + (instancetype)attributeMapWithValue:(NSString *)value; 64 + 65 + /*! 66 + * @method attributeMapWithStaticValue: 67 + * 68 + * @abstract 69 + * Returns an initialized and autoreleased ODAttributeMap object with the given static value. 70 + * 71 + * @discussion 72 + * Returns an initialized and autoreleased ODAttributeMap object with the given static value. 73 + */ 74 + + (instancetype)attributeMapWithStaticValue:(NSString *)staticValue; 75 + 76 + /*! 77 + * @method setStaticValue: 78 + * 79 + * @abstract 80 + * Sets a static value that will always be returned for this mapping. 81 + * 82 + * @discussion 83 + * Sets a static value that will always be returned for this mapping, i.e., "20". 84 + */ 85 + - (void)setStaticValue:(NSString *)staticValue NS_AVAILABLE_MAC(10_9); 86 + 87 + /*! 88 + * @method setVariableSubstitution: 89 + * 90 + * @abstract 91 + * Sets a variable substitution-based value. 92 + * 93 + * @discussion 94 + * Value should be using the syntax '$native$' for all substited values. For example, 95 + * to form a home directory using the "cn" of an LDAP record, substitution could be done 96 + * with "/home/$cn$". 97 + */ 98 + - (void)setVariableSubstitution:(NSString *)variableSubstitution NS_AVAILABLE_MAC(10_9); 99 + 100 + @end
+235
src/OpenDirectory/Headers/ODConfiguration.h
··· 1 + /* 2 + * Copyright (c) 2009-2012 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <Foundation/Foundation.h> 25 + #import <OpenDirectory/OpenDirectory.h> 26 + 27 + enum { 28 + ODPacketSigningDisabled = 0, 29 + ODPacketSigningAllow = 1, 30 + ODPacketSigningRequired = 2, 31 + }; 32 + 33 + enum { 34 + ODPacketEncryptionDisabled = 0, 35 + ODPacketEncryptionAllow = 1, 36 + ODPacketEncryptionRequired = 2, 37 + ODPacketEncryptionSSL = 3, 38 + }; 39 + 40 + @class SFAuthorization; 41 + @class ODMappings; 42 + 43 + /* Signifies that the configuration is "joined" to the directory (a.k.a., Authenticated binding) with it's own dedicated account (often a computer account) */ 44 + FOUNDATION_EXPORT NSString *const ODTrustTypeJoined NS_AVAILABLE_MAC(10_9); 45 + 46 + /* Signfies that some form of credentials is being used to talk to this directory node */ 47 + FOUNDATION_EXPORT NSString *const ODTrustTypeUsingCredentials NS_AVAILABLE_MAC(10_9); 48 + 49 + /* Signifies there is no account associated with this configuration */ 50 + FOUNDATION_EXPORT NSString *const ODTrustTypeAnonymous NS_AVAILABLE_MAC(10_9); 51 + 52 + NS_CLASS_AVAILABLE(10_9, NA) 53 + @interface ODConfiguration : NSObject { 54 + @protected 55 + ODSession *session; 56 + NSString *nodeName; 57 + NSString *comment; 58 + NSArray *defaultModuleEntries; 59 + NSArray *authenticationModuleEntries; 60 + NSArray *discoveryModuleEntries; 61 + NSArray *generalModuleEntries; 62 + ODMappings *defaultMappings; 63 + NSString *templateName; 64 + NSArray *virtualSubnodes; 65 + BOOL hideRegistration; 66 + NSString *preferredDestinationHostName; 67 + uint16_t preferredDestinationHostPort; 68 + NSString *trustAccount; 69 + NSString *trustType; 70 + NSString *trustKerberosPrincipal; 71 + NSString *trustMetaAccount; 72 + BOOL trustUsesMutualAuthentication; 73 + BOOL trustUsesKerberosKeytab; 74 + BOOL trustUsesSystemKeychain; 75 + NSInteger packetSigning; 76 + NSInteger packetEncryption; 77 + BOOL manInTheMiddleProtection; 78 + NSInteger queryTimeoutInSeconds; 79 + NSInteger connectionSetupTimeoutInSeconds; 80 + NSInteger connectionIdleTimeoutInSeconds; 81 + } 82 + 83 + /* the nodename associated with this configuration */ 84 + @property(copy) NSString *nodeName NS_AVAILABLE_MAC(10_9); 85 + 86 + /* comment for this configuration */ 87 + @property(copy) NSString *comment NS_AVAILABLE_MAC(10_9); 88 + 89 + /* default mappings for this configuration (used for all modules unless specific ones are set for the module) */ 90 + @property(strong) ODMappings *defaultMappings NS_AVAILABLE_MAC(10_9); 91 + 92 + /* 93 + * Name of the template used for this configuration, specifically loaded from /System/Library/OpenDirectory/Templates or /Library/OpenDirectory/Templates. These templates 94 + * specify the module layout, settings, etc. appropriate for that template. Any settings in this configuration will override settings from the template 95 + */ 96 + @property(copy) NSString *templateName NS_AVAILABLE_MAC(10_9); 97 + 98 + /* 99 + * A list of subnodenames to be registered on behalf of this configuration. For example, "subnode1" would register "/Nodename/subnode1" automatically so it is visible 100 + * without loading the actual configuration/modules. 101 + */ 102 + @property(copy) NSArray *virtualSubnodes NS_AVAILABLE_MAC(10_9); 103 + 104 + /* Hides the registration of this node so it is not visible to clients in the UI. */ 105 + @property(assign) BOOL hideRegistration NS_AVAILABLE_MAC(10_9); 106 + 107 + /* The optional hostname to be used with this configuration */ 108 + @property(copy) NSString *preferredDestinationHostName NS_AVAILABLE_MAC(10_9); 109 + 110 + /* An optional port to be used in conjunction with the preferred hostname for this configuration */ 111 + @property(assign) uint16_t preferredDestinationHostPort NS_AVAILABLE_MAC(10_9); 112 + 113 + /* The current trust account used with this configuration */ 114 + @property(readonly, copy) NSString *trustAccount NS_AVAILABLE_MAC(10_9); 115 + 116 + /* The current trust meta account used with this configuration */ 117 + @property(readonly, copy) NSString *trustMetaAccount NS_AVAILABLE_MAC(10_9); 118 + 119 + /* The current trust kerberos account used with this configuration */ 120 + @property(readonly, copy) NSString *trustKerberosPrincipal NS_AVAILABLE_MAC(10_9); 121 + 122 + /* Type of trust established for this configuration */ 123 + @property(readonly, copy) NSString *trustType NS_AVAILABLE_MAC(10_9); 124 + 125 + /* Trust uses mutual authentication for security */ 126 + @property(readonly) BOOL trustUsesMutualAuthentication NS_AVAILABLE_MAC(10_9); 127 + 128 + /* Trust uses keytab for password storage */ 129 + @property(readonly) BOOL trustUsesKerberosKeytab NS_AVAILABLE_MAC(10_9); 130 + 131 + /* Trust uses the system keychain to store password */ 132 + @property(readonly) BOOL trustUsesSystemKeychain NS_AVAILABLE_MAC(10_9); 133 + 134 + /* Determines if packet signing is used for this configuration, should be one of the ODPacketSigning values */ 135 + @property(assign) NSInteger packetSigning NS_AVAILABLE_MAC(10_9); 136 + 137 + /* Determins if packet encryption is used for this configuration, should be one of the ODPacketEncryption values */ 138 + @property(assign) NSInteger packetEncryption NS_AVAILABLE_MAC(10_9); 139 + 140 + /* States if some man-in-the-middle protection is required */ 141 + @property(assign) BOOL manInTheMiddleProtection NS_AVAILABLE_MAC(10_9); 142 + 143 + /* Timeout in seconds for all queries issued for this configuration */ 144 + @property(assign) NSInteger queryTimeoutInSeconds NS_AVAILABLE_MAC(10_9); 145 + 146 + /* Timeout in seconds for connection setup for this configuration */ 147 + @property(assign) NSInteger connectionSetupTimeoutInSeconds NS_AVAILABLE_MAC(10_9); 148 + 149 + /* Default timeout in seconds for all connections associated with this configuration */ 150 + @property(assign) NSInteger connectionIdleTimeoutInSeconds NS_AVAILABLE_MAC(10_9); 151 + 152 + /* A list of default ODModuleEntry objects. Default modules are used in all categories, after all "specific" modules */ 153 + @property(copy) NSArray *defaultModuleEntries NS_AVAILABLE_MAC(10_9); 154 + 155 + /* A list of authentication ODModuleEntry objects */ 156 + @property(copy) NSArray *authenticationModuleEntries NS_AVAILABLE_MAC(10_9); 157 + 158 + /* A list of discovery ODModuleEntry objects */ 159 + @property(copy) NSArray *discoveryModuleEntries NS_AVAILABLE_MAC(10_9); 160 + 161 + /* A list of general ODModuleEntry objects used for all other APIs (Queries, modifications, etc.) */ 162 + @property(copy) NSArray *generalModuleEntries NS_AVAILABLE_MAC(10_9); 163 + 164 + /*! 165 + * @method configuration 166 + * 167 + * @abstract 168 + * Returns an initialized and autoreleased ODConfiguration object. 169 + * 170 + * @discussion 171 + * Returns an initialized and autoreleased ODConfiguration object. 172 + */ 173 + + (instancetype)configuration; 174 + 175 + /*! 176 + * @method suggestedTrustAccount: 177 + * 178 + * @abstract 179 + * Returns a suggested name to use for the trust account. 180 + * 181 + * @discussion 182 + * Returns a suggested name to use for a trust account. This name will be derived from the hostname 183 + * (if provided), otherwise it will be derived from the local hostname removing special characters 184 + * that may not be allowed by many systems. 185 + */ 186 + + (NSString *) suggestedTrustAccount:(NSString *)hostname NS_AVAILABLE_MAC(10_9); 187 + 188 + /*! 189 + * @method suggestedTrustPassword: 190 + * 191 + * @abstract 192 + * Returns a suggested password to be used for trust account with the requested length. 193 + * 194 + * @discussion 195 + * Returns a suggested password to be used for trust account with the requested length. 196 + */ 197 + + (NSString *) suggestedTrustPassword:(size_t)length NS_AVAILABLE_MAC(10_9); 198 + 199 + /*! 200 + * @method saveUsingAuthorization:error: 201 + * 202 + * @abstract 203 + * Saves the configuration using the provided authorization. 204 + * 205 + * @discussion 206 + * Saves the configuration using the provided authorization. 207 + */ 208 + - (BOOL) saveUsingAuthorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 209 + 210 + /*! 211 + * @method addTrustType:trustAccount:trustPassword:username:password:joinExisting:error: 212 + * 213 + * @abstract 214 + * Adds a trust account with the provided name and password using the credentials provided by the user. 215 + * 216 + * @discussion 217 + * Adds a trust account with the provided name and password using the credentials provided by the user. User can 218 + * request that the trust be forcibly created (replacing existing trust if found in directory). A trust should be 219 + * established only after enough configuration is available and the configuration been saved. If the trust is 220 + * required, then the configuration can be deleted if necessary upon failure. 221 + */ 222 + - (BOOL) addTrustType:(NSString *)trustType trustAccount:(NSString *)account trustPassword:(NSString *)accountPassword username:(NSString *)username password:(NSString *)password joinExisting:(BOOL)join error:(NSError **)error NS_AVAILABLE_MAC(10_9); 223 + 224 + /*! 225 + * @method removeTrustUsingUsername:password:deleteTrustAccount:error: 226 + * 227 + * @abstract 228 + * Removes trust using the provided username and password. 229 + * 230 + * @discussion 231 + * Removes trust using the provided username and password. The trust account will be removed from the directory only if requested. 232 + */ 233 + - (BOOL) removeTrustUsingUsername:(NSString *)username password:(NSString *)password deleteTrustAccount:(BOOL)deleteAccount error:(NSError **)error NS_AVAILABLE_MAC(10_9); 234 + 235 + @end
+93
src/OpenDirectory/Headers/ODMappings.h
··· 1 + /* 2 + * Copyright (c) 2012 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <Foundation/Foundation.h> 25 + 26 + @class ODRecordMap; 27 + 28 + NS_CLASS_AVAILABLE(10_9, NA) 29 + @interface ODMappings : NSObject { 30 + @protected 31 + NSString *comment; 32 + NSString *templateName; 33 + NSString *identifier; 34 + NSString *function; 35 + NSArray *functionAttributes; 36 + NSMutableDictionary *recordTypes; 37 + } 38 + 39 + /* Short comment about the mappings */ 40 + @property(copy) NSString *comment NS_AVAILABLE_MAC(10_9); 41 + 42 + /* 43 + * Name of the mappings template to be used for this configuration from /System/Library/OpenDirectory/Mappings or /Library/OpenDirectory/Mappings 44 + * if a template is used, then no other values should be set, template is an exclusive setting 45 + */ 46 + @property(copy) NSString *templateName NS_AVAILABLE_MAC(10_9); 47 + 48 + /* RFC1034 identifier for this mapping, com.company.mapping */ 49 + @property(copy) NSString *identifier NS_AVAILABLE_MAC(10_9); 50 + 51 + /* Returns a list of NSString values for all attributes currently configured */ 52 + @property(readonly, copy) NSArray *recordTypes NS_AVAILABLE_MAC(10_9); 53 + 54 + /* function to translate record types */ 55 + @property(copy) NSString *function NS_AVAILABLE_MAC(10_9); 56 + 57 + /* native attributes required for translation function to work */ 58 + @property(copy) NSArray *functionAttributes NS_AVAILABLE_MAC(10_9); 59 + 60 + /*! 61 + * @method mappings 62 + * 63 + * @abstract 64 + * Returns an initialized and autoreleased ODMappings object. 65 + * 66 + * @discussion 67 + * Returns an initialized and autoreleased ODMappings object. 68 + */ 69 + + (instancetype)mappings; 70 + 71 + /*! 72 + * @method recordType: 73 + * 74 + * @abstract 75 + * Returns an ODRecordMap associated with the provided recordtype. 76 + * 77 + * @discussion 78 + * Returns an ODRecordMap associated with the provided recordtype. 79 + */ 80 + - (ODRecordMap *) recordMapForStandardRecordType:(NSString *)stdType NS_AVAILABLE_MAC(10_9); 81 + 82 + /*! 83 + * @method setRecordMap:forRecordType: 84 + * 85 + * @abstract 86 + * Sets a particular ODRecordMap for a given standard record type. 87 + * 88 + * @discussion 89 + * Sets a particular ODRecordMap for a given standard record type. 90 + */ 91 + - (void) setRecordMap:(ODRecordMap *)map forStandardRecordType:(NSString *)stdType NS_AVAILABLE_MAC(10_9); 92 + 93 + @end
+87
src/OpenDirectory/Headers/ODModuleEntry.h
··· 1 + /* 2 + * Copyright (c) 2012 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <Foundation/Foundation.h> 25 + 26 + @class ODMappings; 27 + 28 + NS_CLASS_AVAILABLE(10_9, NA) 29 + @interface ODModuleEntry : NSObject { 30 + @protected 31 + ODMappings *mappings; 32 + NSArray *supportedOptions; 33 + NSString *name; 34 + NSString *xpcServiceName; 35 + NSMutableDictionary *options; 36 + NSString *uuidString; 37 + }; 38 + 39 + /* mappings that are specific to this module configuration */ 40 + @property(strong) ODMappings *mappings NS_AVAILABLE_MAC(10_9); 41 + 42 + /* A list supported options for a module. The list will contain dictionaries with keys ODModuleOptionName, ODModuleOptionType, etc. */ 43 + @property(readonly, copy) NSArray *supportedOptions NS_AVAILABLE_MAC(10_9); 44 + 45 + /* Name of the module, used in logging, etc. */ 46 + @property(copy) NSString *name NS_AVAILABLE_MAC(10_9); 47 + 48 + /* XPCService to be used for this module */ 49 + @property(copy) NSString *xpcServiceName NS_AVAILABLE_MAC(10_9); 50 + 51 + /* A UUID in string form that uniquely identifies this configuration, will be assigned automatically if missing */ 52 + @property(copy) NSString *uuidString NS_AVAILABLE_MAC(10_9); 53 + 54 + /*! 55 + * @method moduleEntryWithName:xpcServiceName: 56 + * 57 + * @abstract 58 + * Creates a new module entry with a given name and service. 59 + * 60 + * @discussion 61 + * Creates a new module entry with a given name and service. 62 + */ 63 + + (instancetype)moduleEntryWithName:(NSString *)name xpcServiceName:(NSString *)xpcServiceName NS_AVAILABLE_MAC(10_9); 64 + 65 + /*! 66 + * @method setOption:value: 67 + * 68 + * @abstract 69 + * Assigns a particular option for this module. 70 + * 71 + * @discussion 72 + * Options are dictated by the module and can be queried via [module supportedOptions]. 73 + */ 74 + - (void) setOption:(NSString *)optionName value:(id)value NS_AVAILABLE_MAC(10_9); 75 + 76 + /*! 77 + * @method option: 78 + * 79 + * @abstract 80 + * Fetches the current setting for the requested option. 81 + * 82 + * @discussion 83 + * Fetches the current setting for the requested option. 84 + */ 85 + - (id) option:(NSString *)optionName NS_AVAILABLE_MAC(10_9); 86 + 87 + @end
+324
src/OpenDirectory/Headers/ODNode.h
··· 1 + /* 2 + * Copyright (c) 2005-2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <OpenDirectory/OpenDirectory.h> 25 + 26 + @class ODConfiguration; 27 + @class ODRecord; 28 + 29 + /*! 30 + @class ODNode 31 + @abstract This class is used to work with OpenDirectory nodes. 32 + @discussion OpenDirectory uses nodes to represent different sources of directory information, via the local disk, LDAP, etc. 33 + */ 34 + @interface ODNode : NSObject { 35 + @private 36 + void *_internal; 37 + } 38 + 39 + /*! 40 + @method nodeWithSession:type:error: 41 + @abstract Create an autoreleased ODNode of the given type, optionally in a specific session. 42 + @discussion Autoreleased instance of an ODNode with a provided ODSession and ODNodeType. outError is 43 + optional parameter, nil can be passed if error details are not needed. 44 + */ 45 + + (instancetype)nodeWithSession:(ODSession *)inSession type:(ODNodeType)inType error:(NSError **)outError NS_AVAILABLE(10_6, NA); 46 + 47 + /*! 48 + @method nodeWithSession:name:error: 49 + @abstract Create an autoreleased ODNode with the given name, optionally in a specific session. 50 + @discussion autoreleased instance of an ODNode with a provided ODSession and node name. outError is 51 + optional parameter, nil can be passed if error details are not needed. 52 + */ 53 + + (instancetype)nodeWithSession:(ODSession *)inSession name:(NSString *)inName error:(NSError **)outError NS_AVAILABLE(10_6, NA); 54 + 55 + /*! 56 + @method initWithSession:type:error: 57 + @abstract Initialize an ODNode instance of the given type, optionally in a specific session. 58 + @discussion initialize instance of an ODNode with a provided ODSession and ODNodeType. outError is 59 + optional parameter, nil can be passed if error details are not needed. 60 + */ 61 + - (instancetype)initWithSession:(ODSession *)inSession type:(ODNodeType)inType error:(NSError **)outError NS_AVAILABLE(10_6, NA); 62 + 63 + /*! 64 + @method initWithSession:name:error: 65 + @abstract Initialize an ODNode instance with the given name, optionally in a specific session. 66 + @discussion initialize instance of an ODNode with a provided ODSession and node name. outError is optional 67 + parameter, nil can be passed if error details are not needed. 68 + */ 69 + - (instancetype)initWithSession:(ODSession *)inSession name:(NSString *)inName error:(NSError **)outError NS_AVAILABLE(10_6, NA); 70 + 71 + /*! 72 + @method subnodeNamesAndReturnError: 73 + @abstract Returns NSArray of node names for this node, which may contain sub-nodes or search policy nodes 74 + @discussion Returns NSArray of node names for this node, which may contain sub-nodes or search policy nodes. 75 + Commonly used with Search policy nodes. outError is optional parameter, nil can be passed if error 76 + details are not needed. 77 + */ 78 + - (NSArray *)subnodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 79 + 80 + /*! 81 + @method unreachableSubnodeNamesAndReturnError: 82 + @abstract Will return NSArray of names of subnodes that are not currently reachable. 83 + @discussion Will return NSArray of names of subnodes that are not currently reachable. Commonly used with Search policy 84 + nodes to determine if any nodes are currently unreachable, but may also return other subnodes if the 85 + OpenDirectory plugin supports. outError is optional parameter, nil can be passed if error details are not needed. 86 + */ 87 + - (NSArray *)unreachableSubnodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 88 + 89 + /*! 90 + @property nodeName 91 + @abstract The node name. 92 + @discussion The node name, corresponding to its path in OpenDirectory. 93 + */ 94 + @property (nonatomic, readonly, copy) NSString *nodeName NS_AVAILABLE(10_6, NA); 95 + 96 + /*! 97 + @method nodeDetails:error: 98 + @abstract Returns a dictionary of information about the instance of ODNode 99 + @discussion Returns a dictionary of information about the instance of ODNode. Details such as Trust information 100 + (kODAttributeTypeTrustInformation) or other Node details can be retrieved. outError is optional parameter, 101 + nil can be passed if error details are not needed. 102 + 103 + */ 104 + - (NSDictionary *)nodeDetailsForKeys:(NSArray *)inKeys error:(NSError **)outError NS_AVAILABLE(10_6, NA); 105 + 106 + /*! 107 + @method supportedRecordTypesAndReturnError: 108 + @abstract Returns a NSArray of the record types supported by this node. 109 + @discussion Returns a NSArray of the record types supported by this node. If node does not support the check 110 + then all possible types will be returned. outError is optional parameter, nil can be passed if error details 111 + are not needed. 112 + */ 113 + - (NSArray *)supportedRecordTypesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 114 + 115 + /*! 116 + @method supportedAttributesForRecordType:error: 117 + @abstract Will return a list of attribute types supported for that attribute if possible 118 + @discussion Will return a list of attribute types supported for that attribute if possible. If no specific 119 + types are available, then all possible values will be returned instead. outError is optional parameter, 120 + nil can be passed if error details are not needed. 121 + */ 122 + - (NSArray *)supportedAttributesForRecordType:(ODRecordType)inRecordType error:(NSError **)outError NS_AVAILABLE(10_6, NA); 123 + 124 + /*! 125 + @method setCredentialsWithRecordType:recordName:password:error: 126 + @abstract Sets the credentials for interaction with the ODNode 127 + @discussion Sets the credentials for interaction with the ODNode. Record references, etc. will use these credentials 128 + to query or change data. Setting the credentials on a node referenced by other OD object types will 129 + change the credentials for all for all references. outError is optional parameter, nil can be passed if error 130 + details are not needed. 131 + */ 132 + - (BOOL)setCredentialsWithRecordType:(ODRecordType)inRecordType recordName:(NSString *)inRecordName password:(NSString *)inPassword 133 + error:(NSError **)outError NS_AVAILABLE(10_6, NA); 134 + 135 + /*! 136 + @method setCredentialsWithRecordType:authType:authItems:outAuthItems:context:error: 137 + @abstract Allows use of other OpenDirectory types of authentications to set the credentials for an ODNode 138 + @discussion Allows the caller to use other types of authentications that are available in OpenDirectory, that may 139 + require response-request loops, etc. Not all OD plugins will support this call, look for 140 + kODErrorCredentialsMethodNotSupported in outError. outError is optional parameter, nil can be passed if 141 + error details is not needed. 142 + */ 143 + - (BOOL)setCredentialsWithRecordType:(ODRecordType)inRecordType authenticationType:(ODAuthenticationType)inType 144 + authenticationItems:(NSArray *)inItems continueItems:(NSArray **)outItems 145 + context:(id *)outContext error:(NSError **)outError NS_AVAILABLE(10_6, NA); 146 + 147 + /*! 148 + @method setCredentialsUsingKerberosCache:error: 149 + @abstract Unsupported method. 150 + @discussion Unsupported method. 151 + */ 152 + - (BOOL)setCredentialsUsingKerberosCache:(NSString *)inCacheName error:(NSError **)outError NS_DEPRECATED_MAC(10_6, 10_7) NS_AVAILABLE(10_6, NA); 153 + 154 + /*! 155 + @method createRecordWithRecordType:name:attributes:error: 156 + @abstract Creates a record in this node, using the given name and attributes. 157 + @discussion Takes all the provided attributes and type to create an entire record. The function will assign a 158 + UUID to the record automatically. This UUID can be overwritten by the client by passing with the 159 + other attributes. inAttributes is optional, nil can be passed if no other attributes are to be set. 160 + */ 161 + - (ODRecord *)createRecordWithRecordType:(ODRecordType)inRecordType name:(NSString *)inRecordName 162 + attributes:(NSDictionary *)inAttributes error:(NSError **)outError NS_AVAILABLE(10_6, NA); 163 + 164 + /*! 165 + @method recordWithRecordType:name:attributes:error: 166 + @abstract Returns an ODRecord object that references the requested type and name 167 + @discussion Returns an ODRecord object that references the requested type and name. The record will have cached the 168 + attributes requested. Further attributes can be requested via ODRecord APIs. For performance it is best 169 + to ask for as many attributes that are needed as possible up front. 170 + */ 171 + - (ODRecord *)recordWithRecordType:(ODRecordType)inRecordType name:(NSString *)inRecordName attributes:(id)inAttributes 172 + error:(NSError **)outError NS_AVAILABLE(10_6, NA); 173 + 174 + /*! 175 + @method customCall:sendData:error: 176 + @abstract Sends a custom code to the node; input and output data formats are specific to the call. 177 + @discussion Sends a custom code to the node; input and output data formats are specific to the call. outError is 178 + optional parameter, nil can be passed if error details are not needed. 179 + */ 180 + - (NSData *)customCall:(NSInteger)inCustomCode sendData:(NSData *)inSendData error:(NSError **)outError NS_AVAILABLE(10_6, NA); 181 + 182 + /*! 183 + @method customFunction:payload:error: 184 + @abstract Sends a custom function call to the node; data is a type specific to the call. 185 + @discussion Sends a custom function call to the node; data is a type specific to the call. 'error' is an 186 + optional parameter therefore nil can be passed if error details are not needed. Return type is 187 + defined by the custom function requested. 188 + */ 189 + - (id)customFunction:(NSString *)function payload:(id)payload error:(NSError **)error NS_AVAILABLE(10_9, NA); 190 + 191 + /*! 192 + * @method configuration 193 + * 194 + * @abstract 195 + * Returns an ODConfiguration object for the node. 196 + * 197 + * @discussion 198 + * Returns an ODConfiguration object for the node. 199 + */ 200 + @property (readonly, strong) ODConfiguration *configuration; 201 + 202 + /*! 203 + @method policiesAndReturnError: 204 + @abstract This will copy any policies configured for the node. 205 + @discussion This will copy any policies configured for the node. 206 + */ 207 + - (NSDictionary *)policiesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use accountPoliciesAndReturnError:"); 208 + 209 + /*! 210 + @function supportedPoliciesAndReturnError: 211 + @abstract This will return a dictionary of supported policies. 212 + @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed 213 + for the policy in question. For example, if password history is available, it will state how much history is 214 + supported. 215 + */ 216 + - (NSDictionary *)supportedPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA); 217 + 218 + /*! 219 + @function setPolicies:error: 220 + @abstract This will set the policy for the node. 221 + @discussion This will set the policy for the node. Policies are evaluated in combination with record-level policies. 222 + */ 223 + - (BOOL)setPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use setAccountPolicies:error:"); 224 + 225 + /*! 226 + @function setPolicy:value:error: 227 + @abstract This will set a specific policy setting for the node. 228 + @discussion This will set a specific policy setting for the node. 229 + */ 230 + - (BOOL)setPolicy:(ODPolicyType)policy value:(id)value error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use addAccountPolicy:toCategory:error:"); 231 + 232 + /*! 233 + @function removePolicy:value:error: 234 + @abstract This will remove a specific policy setting from the node. 235 + @discussion This will remove a specific policy setting from the node. 236 + */ 237 + - (BOOL)removePolicy:(ODPolicyType)policy error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use removeAccountPolicy:fromCategory:error:"); 238 + 239 + /*! 240 + @method addAccountPolicy:toCategory:error: 241 + @abstract This will add an account policy to the node for the specified category. 242 + @discussion This will add an account policy to the node for the specified category. 243 + The specified policy will be applied to all users in the 244 + specified node when policies are evaluated. 245 + @param policy a dictionary containing the specific policy to be added. 246 + The dictionary may contain the following keys: 247 + kODPolicyKeyIdentifier a required key identifying the policy. 248 + kODPolicyKeyParameters an optional key containing a dictionary of 249 + parameters that can be used for informational purposes or in 250 + the policy format string. 251 + kODPolicyKeyContent a required key specifying the policy, 252 + from which a predicate will be created for evaluating 253 + the policy. 254 + @param category a valid ODPolicyCategoryType to which the specified policy will be added. 255 + @param error an optional NSError reference for error details. 256 + @result a BOOL which signifies if the policy addition succeeded, otherwise error is set. 257 + */ 258 + - (BOOL)addAccountPolicy:(NSDictionary *)policy toCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 259 + 260 + /*! 261 + @method removeAccountPolicy:fromCategory:error: 262 + @abstract This will remove an account policy from the node for the specified category. 263 + @discussion This will remove an account policy from the node for the specified category. 264 + @param policy a dictionary containing the specific policy to be 265 + removed, with the same format as described in addAccountPolicy. 266 + @param category a valid ODPolicyCategoryType from which the specified policy will be removed. 267 + @param error an optional NSError reference for error details. 268 + @result a BOOL which signifies if the policy removal succeeded, otherwise error is set. 269 + */ 270 + - (BOOL)removeAccountPolicy:(NSDictionary *)policy fromCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 271 + 272 + /*! 273 + @method setAccountPolicies:error: 274 + @abstract This will set the policies for the node. 275 + @discussion This will set the policies for the node, replacing any existing 276 + policies. All of the policies in the set will be applied to all 277 + users in the specified node when policies are evaluated. 278 + @param policies a dictionary containing all of the policies to be set 279 + for the node. The dictionary may contain the following keys: 280 + kODPolicyCategoryAuthentication an optional key with a value 281 + of an array of policy dictionaries that specify when 282 + authentications should be allowed. 283 + kODPolicyCategoryPasswordContent an optional key with a 284 + value of an array of policy dictionaries the specify the 285 + required content of passwords. 286 + kODPolicyCategoryPasswordChange an optional key with a value 287 + of an array of policy dictionaries that specify when 288 + passwords are required to be changed. 289 + @param error an optional NSError reference for error details. 290 + @result a BOOL which signifies if the policy set succeeded, otherwise error is set. 291 + */ 292 + - (BOOL)setAccountPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 293 + 294 + /*! 295 + @method accountPoliciesAndReturnError: 296 + @abstract Returns a dictionary containing any policies configured for the node. 297 + @discussion Returns a dictionary containing any policies configured for the node. 298 + @param error an optional NSError reference for error details. 299 + @result an NSDictionary containing all currently set policies. The 300 + format of the dictionary is the same as described in 301 + setAccountPolicies. 302 + */ 303 + - (NSDictionary *)accountPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 304 + 305 + /*! 306 + @method passwordContentCheck:forRecordName:error: 307 + @abstract Validates a password against the node's password content policies. 308 + @discussion Validates a password against the node's password content policies. 309 + The node's password content policies will be evaluated to 310 + determine if the password is acceptable. May be used prior to 311 + creating the record. 312 + 313 + This check is only definitive at the time it was requested. The 314 + policy or the environment could change before the password change 315 + is actually requested. Errors from the password change request 316 + should be consulted. 317 + 318 + @param password the password to be evaluated against the content policies. 319 + @param recordName the name of the record. 320 + @param error an optional NSError reference for error details. 321 + @result a bool which signifies if the password passes all content policies, otherwise error is set. 322 + */ 323 + - (BOOL)passwordContentCheck:(NSString *)password forRecordName:(NSString *)recordName error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 324 + @end
+128
src/OpenDirectory/Headers/ODQuery.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <OpenDirectory/OpenDirectory.h> 25 + 26 + @class ODQuery; 27 + @class ODNode; 28 + 29 + /*! 30 + @protocol ODQueryDelegate 31 + @abstract The delegate method for receiving query results from the NSRunLoop-based queries 32 + @discussion The delegate method called as results are returned from an NSRunLoop-based query. These results are only partial 33 + and delegate is called repeatedly as results are available. The incoming result must be retained or copied. The 34 + array will be released by the NSRunLoop upon return. Incoming results do not include previous results, 35 + only the most resent results are returned. inResults can be nil if an error occurs or the query is complete. If 36 + inResults and inError are nil then the query has completed. 37 + */ 38 + @protocol ODQueryDelegate <NSObject> 39 + @required 40 + - (void)query:(ODQuery *)inQuery foundResults:(NSArray *)inResults error:(NSError *)inError NS_AVAILABLE(10_6, NA); 41 + @end 42 + 43 + /*! 44 + @class ODQuery 45 + @abstract Class used for querying OpenDirectory. 46 + @discussion OpenDirectory queries may be used to search for different types of records, e.g. users, groups. 47 + */ 48 + @interface ODQuery : NSObject <NSCopying> 49 + { 50 + @private 51 + void *_internal; 52 + } 53 + 54 + /*! 55 + @method queryWithNode:forRecordTypes:attribute:matchType:queryValues:returnAttributes:maximumResults:error: 56 + @abstract Creates an autoreleased query with the node using the parameters provided 57 + @discussion Creates an autoreleased query with the node using the supplied query parameters. Some parameters 58 + can either be NSString or NSData or an NSArray of either NSString or NSData. Passing nil for 59 + returnAttributes is equivalent to passing kODAttributeTypeStandardOnly. outError is optional parameter, 60 + nil can be passed if error details are not needed. 61 + */ 62 + + (ODQuery *)queryWithNode:(ODNode *)inNode forRecordTypes:(id)inRecordTypeOrList attribute:(ODAttributeType)inAttribute 63 + matchType:(ODMatchType)inMatchType queryValues:(id)inQueryValueOrList 64 + returnAttributes:(id)inReturnAttributeOrList maximumResults:(NSInteger)inMaximumResults 65 + error:(NSError **)outError NS_AVAILABLE(10_6, NA); 66 + 67 + /*! 68 + @method initWithNode:forRecordTypes:attribute:matchType:queryValues:returnAttributes:maximumResults:error: 69 + @abstract Creates a query with the node using the parameters provided 70 + @discussion Creates a query with the node using the supplied query parameters. Some parameters 71 + can either be NSString or NSData or an NSArray of either NSString or NSData. Passing nil for 72 + returnAttributes is equivalent to passing kODAttributeTypeStandardOnly. outError is optional parameter, 73 + nil can be passed if error details are not needed. 74 + */ 75 + - (instancetype)initWithNode:(ODNode *)inNode forRecordTypes:(id)inRecordTypeOrList attribute:(ODAttributeType)inAttribute 76 + matchType:(ODMatchType)inMatchType queryValues:(id)inQueryValueOrList 77 + returnAttributes:(id)inReturnAttributeOrList maximumResults:(NSInteger)inMaximumResults error:(NSError **)outError NS_AVAILABLE(10_6, NA); 78 + 79 + /*! 80 + @method resultsAllowingPartial:error: 81 + @abstract Returns results from a provided ODQuery synchronously 82 + @discussion Returns results from a provided ODQuery synchronously. Passing NO to inAllowPartialResults 83 + will block the call until all results are returned or an error occurs. YES can be passed at any time 84 + even if previous calls were made with NO. outError is optional parameter, nil can be passed if error 85 + details are not needed. 86 + */ 87 + - (NSArray *)resultsAllowingPartial:(BOOL)inAllowPartialResults error:(NSError **)outError NS_AVAILABLE(10_6, NA); 88 + 89 + /*! 90 + @property delegate 91 + @abstract The currently set delegate 92 + @discussion The query delegate which will receive asynchronous query results. 93 + */ 94 + @property (nonatomic, readwrite, assign) id <ODQueryDelegate> delegate NS_AVAILABLE(10_6, NA); 95 + 96 + /*! 97 + @method scheduleInRunLoop:forMode: 98 + @abstract Adds the query object to the specified NSRunLoop to receive asynchronous results 99 + @discussion Adds the query object to the specified NSRunLoop to receive asynchronous results. A delegate must be set 100 + in advance otherwise results may be lost due to the lack of a receiver. 101 + */ 102 + - (void)scheduleInRunLoop:(NSRunLoop *)inRunLoop forMode:(NSString *)inMode NS_AVAILABLE(10_6, NA); 103 + 104 + /*! 105 + @method removeFromRunLoop:forMode: 106 + @abstract Removes the query object from the specified NSRunLoop 107 + @discussion Removes the query object from the specified NSRunLoop. 108 + */ 109 + - (void)removeFromRunLoop:(NSRunLoop *)inRunLoop forMode:(NSString *)inMode NS_AVAILABLE(10_6, NA); 110 + 111 + /*! 112 + @method synchronize 113 + @abstract Will dispose of any results and restart the query. 114 + @discussion Will dispose of any results and restart the query for subsequent resultsAllowingPartial: calls. If the query 115 + is currently scheduled on a RunLoop, then the delegate will be called with inResults == nil and 116 + [inError code] == kODErrorQuerySynchronize and [inError domain] == ODFrameworkErrorDomain, signifying that 117 + all existing results should be thrown away in preparation for new results. 118 + */ 119 + - (void)synchronize NS_AVAILABLE(10_6, NA); 120 + 121 + /*! 122 + @property operationQueue 123 + @abstract The NSOperationQueue on which asynchronous results are delivered to the delegate. 124 + @discussion The NSOperationQueue on which asynchronous results are delivered to the delegate. 125 + */ 126 + @property (readwrite, retain) NSOperationQueue * operationQueue NS_AVAILABLE(10_6, NA); 127 + 128 + @end
+443
src/OpenDirectory/Headers/ODRecord.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <OpenDirectory/OpenDirectory.h> 25 + 26 + /*! 27 + @class ODRecord 28 + @abstract This class is used to read, update and modify records within the directory 29 + @discussion This class is used to read, update and modify records within the directory. outError is optional parameter, 30 + nil can be passed if error details are not needed. 31 + */ 32 + @interface ODRecord : NSObject 33 + 34 + /*! 35 + @method setNodeCredentials:password:error: 36 + @abstract Similar to calling -[ODNode setCredentials:] except credentials are only set for this particular 37 + record's node 38 + @discussion Sets the credentials if necessary on the ODNode referenced by this ODRecord. Very similar to 39 + calling -[ODNode setCredentials:] except other records referencing the underlying node will not get 40 + authenticated, therefore inadvertant changes cannot occur. If all records referencing a particular 41 + node need to be updated, then use -[ODNode setCredentials:] on the original node instead. If the 42 + node is already authenticated with the same name and password, it will be a NOOP call. The original 43 + ODNode held by an ODRecord will be released when the credentials are changed for the connection 44 + associated with the record. outError is optional parameter, nil can be passed if error details are not needed. 45 + */ 46 + - (BOOL)setNodeCredentials:(NSString *)inUsername password:(NSString *)inPassword error:(NSError **)outError NS_AVAILABLE(10_6, NA); 47 + 48 + /*! 49 + @method setNodeCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error: 50 + @abstract Similar to calling -[ODNode setCredentialsWithRecordType:] except credentials are only set for this particular record's 51 + node 52 + @discussion Allows the caller to use other types of authentications that are available in OpenDirectory, that may 53 + require response-request loops, etc. Not all OD plugins will support this call, look for 54 + kODErrorCredentialsMethodNotSupported in outError. Same behavior as ODRecordSetNodeCredentials. outError 55 + is optional parameter, nil can be passed if error details are not needed. 56 + */ 57 + - (BOOL)setNodeCredentialsWithRecordType:(ODRecordType)inRecordType authenticationType:(ODAuthenticationType)inType 58 + authenticationItems:(NSArray *)inItems continueItems:(NSArray **)outItems 59 + context:(id *)outContext error:(NSError **)outError NS_AVAILABLE(10_6, NA); 60 + 61 + /*! 62 + @method setNodeCredentialsUsingKerberosCache:error: 63 + @abstract Unsupported method. 64 + @discussion Unsupported method. 65 + */ 66 + - (BOOL)setNodeCredentialsUsingKerberosCache:(NSString *)inCacheName error:(NSError **)outError NS_DEPRECATED_MAC(10_6, 10_7); 67 + 68 + /*! 69 + @method passwordPolicyAndReturnError: 70 + @abstract Returns a dictionary containing the password policy for the record if available. 71 + @discussion Returns a dictionary containing the password policy for the record if available. If no policy for record 72 + nil will be returned. outError is optional parameter, nil can be passed if error details are not needed. 73 + */ 74 + - (NSDictionary *)passwordPolicyAndReturnError:(NSError **)outError __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_9, __IPHONE_NA, __IPHONE_NA, "use effectivePoliciesAndReturnError"); 75 + 76 + /*! 77 + @method verifyPassword:error: 78 + @abstract Verifies the password provided is valid for the record 79 + @discussion Verifies the password provided is valid for the record. outError is optional parameter, nil can be passed if 80 + error details are not needed. 81 + */ 82 + - (BOOL)verifyPassword:(NSString *)inPassword error:(NSError **)outError NS_AVAILABLE(10_6, NA); 83 + 84 + /*! 85 + @method verifyExtendedWithAuthenticationType:authenticationItems:continueItems:context:error: 86 + @abstract Allows use of other OpenDirectory types of authentications 87 + @discussion Allows the caller to use other types of authentications that are available in OpenDirectory, that may 88 + require response-request loops, etc. A bool with the result of the operation. 89 + If it fails, outError can be checked for more specific error. Some ODNodes may not support the call 90 + so an error code of kODErrorCredentialsMethodNotSupported may be returned. outError is optional 91 + parameter, nil can be passed if error details are not needed. 92 + */ 93 + - (BOOL)verifyExtendedWithAuthenticationType:(ODAuthenticationType)inType authenticationItems:(NSArray *)inItems 94 + continueItems:(NSArray **)outItems context:(id *)outContext error:(NSError **)outError NS_AVAILABLE(10_6, NA); 95 + 96 + /*! 97 + @method changePassword:toPassword:error: 98 + @abstract Changes the password for a record 99 + @discussion Changes the password for a record. The oldPassword can be nil if password is being set assuming the appropriate 100 + privileges are in place. outError is optional parameter, nil can be passed if error details are not needed. 101 + */ 102 + - (BOOL)changePassword:(NSString *)oldPassword toPassword:(NSString *)newPassword error:(NSError **)outError NS_AVAILABLE(10_6, NA); 103 + 104 + /*! 105 + @method synchronizeAndReturnError: 106 + @abstract Synchronizes the record from the Directory in order to get current data and/or commit pending changes 107 + @discussion Synchronizes the record from the Directory in order to get current data. Any previously fetched attributes 108 + will be re-fetch from the Directory. This will not re-fetch the entire record, unless the entire record 109 + has been accessed. Additionally, any changes made to the record will be committed to the directory, 110 + if the node does not do immediate commits. outError is optional parameter, nil can be passed if error details 111 + are not needed. 112 + */ 113 + - (BOOL)synchronizeAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 114 + 115 + /*! 116 + @property recordType 117 + @abstract Type of the record. 118 + @discussion The record type. 119 + */ 120 + @property (nonatomic, readonly, copy) NSString *recordType NS_AVAILABLE(10_6, NA); 121 + 122 + /*! 123 + @property recordName 124 + @abstract Name of the record. 125 + @discussion This is the official record name. 126 + */ 127 + @property (nonatomic, readonly, copy) NSString *recordName NS_AVAILABLE(10_6, NA); 128 + 129 + /*! 130 + @method recordDetailsForAttributes:error: 131 + @abstract Returns the attributes and values in the form of a key-value pair set. 132 + @discussion Returns the attributes and values in the form of a key-value pair set for this record. The key is a 133 + NSString of the attribute name (e.g., kODAttributeTypeRecordName, etc.) and the value is an NSArray 134 + of either NSData or NSString depending on the type of data. Binary data will be returned as NSData. 135 + If nil is passed, then all currently retrieved attributes will be returned. outError is optional parameter, 136 + nil can be passed if error details are not needed. 137 + */ 138 + - (NSDictionary *)recordDetailsForAttributes:(NSArray *)inAttributes error:(NSError **)outError NS_AVAILABLE(10_6, NA); 139 + 140 + /*! 141 + @method valuesForAttribute:error: 142 + @abstract Returns an NSArray of NSString or NSData values of the attribute 143 + @discussion Returns an NSArray of NSString or NSData depending on the type of data. Binary data will be 144 + returned as NSData. outError is optional parameter, nil can be passed if error details are not needed. 145 + */ 146 + - (NSArray *)valuesForAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA); 147 + 148 + /*! 149 + @method setValue:forAttribute:error: 150 + @abstract Will take a mixture of NSData or NSString or an NSArray of either type when setting the values of an attribute 151 + @discussion Will take a mixture of NSData or NSString or an NSArray of either type when setting the values of an attribute. 152 + outError is optional parameter, nil can be passed if error details are not needed. 153 + */ 154 + - (BOOL)setValue:(id)inValueOrValues forAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA); 155 + 156 + /*! 157 + @method removeValuesForAttribute:error: 158 + @abstract Removes all the values for an attribute. 159 + @discussion Removes all the values for an attribute. outError is optional parameter, nil can be passed if 160 + error details are not needed. 161 + */ 162 + - (BOOL)removeValuesForAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA); 163 + 164 + /*! 165 + @method addValue:toAttribute:error: 166 + @abstract Will add a value to an attribute 167 + @discussion Will add a value to an attribute. Should be either NSData or NSString type. outError is optional 168 + parameter, nil can be passed if error details are not needed. 169 + */ 170 + - (BOOL)addValue:(id)inValue toAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA); 171 + 172 + /*! 173 + @method removeValue:fromAttribute:error: 174 + @abstract Will remove a value from an attribute 175 + @discussion Will remove a value from an attribute. Should be either NSData or NSString type. outError is optional 176 + parameter, nil can be passed if error details are not needed. 177 + */ 178 + - (BOOL)removeValue:(id)inValue fromAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA); 179 + 180 + /*! 181 + @method deleteRecordAndReturnError: 182 + @abstract Deletes the record from the node and invalidates the record. 183 + @discussion Deletes the record from the node and invalidates the record. The ODRecord should be 184 + released after deletion. outError is optional parameter, nil can be passed if error details are not needed. 185 + */ 186 + - (BOOL)deleteRecordAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 187 + 188 + /*! 189 + @method policiesAndReturnError: 190 + @abstract This will copy any policies configured for the record. 191 + @discussion This will copy any policies configured for the record. 192 + */ 193 + - (NSDictionary *)policiesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use accountPoliciesAndReturnError:"); 194 + 195 + /*! 196 + @method effectivePoliciesAndReturnError: 197 + @abstract This will copy any policies configured for the record. 198 + @discussion This will copy any policies configured for the record. 199 + */ 200 + - (NSDictionary *)effectivePoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use authenticationAllowedAndReturnError: and similar methods"); 201 + 202 + /*! 203 + @function supportedPoliciesAndReturnError: 204 + @abstract This will return a dictionary of supported policies. 205 + @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed 206 + for the policy in question. For example, if password history is available, it will state how much history is 207 + supported. 208 + */ 209 + - (NSDictionary *)supportedPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA); 210 + 211 + /*! 212 + @function setPolicies:error: 213 + @abstract This will set the policy for the record. 214 + @discussion This will set the policy for the record. Policies are evaluated in combination with node-level policies. 215 + */ 216 + - (BOOL)setPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use setAccountPolicies:error:"); 217 + 218 + /*! 219 + @function setPolicy:value:error: 220 + @abstract This will set a specific policy setting for the record. 221 + @discussion This will set a specific policy setting for the record. 222 + */ 223 + - (BOOL)setPolicy:(ODPolicyType)policy value:(id)value error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use addAccountPolicy:toCategory:error:"); 224 + 225 + /*! 226 + @function removePolicy:error: 227 + @abstract This will remove a specific policy setting from the record. 228 + @discussion This will remove a specific policy setting from the record. 229 + */ 230 + - (BOOL)removePolicy:(ODPolicyType)policy error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use removeAccountPolicy:fromCategory:error:"); 231 + 232 + /*! 233 + @method addAccountPolicy:toCategory:error: 234 + @abstract This will add a specific policy to the specific category for the record. 235 + @discussion This will add a specific policy to the specific category for the record. 236 + The specified policy will be applied, in combination with any 237 + node policies, to the specified record when policies are evaluated. 238 + @param policy a dictionary containing the specific policy to be added. 239 + The dictionary may contain the following keys: 240 + kODPolicyKeyIdentifier a required key identifying the policy. 241 + kODPolicyKeyParameters an optional key containing a dictionary of 242 + parameters that can be used for informational purposes or in 243 + the policy format string. 244 + kODPolicyKeyContent a required key specifying the policy, 245 + from which a predicate will be created for evaluating 246 + the policy. 247 + @param category a valid ODPolicyCategoryType to which the policy will be added. 248 + @param error an optional NSError reference for error details. 249 + @result a BOOL which signifies if the policy addition succeeded, otherwise error is set. 250 + */ 251 + - (BOOL)addAccountPolicy:(NSDictionary *)policy toCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 252 + 253 + /*! 254 + @method removeAccountPolicy:fromCategory:error: 255 + @abstract This will remove a specific policy from the specific category for the record. 256 + @discussion This will remove a specific policy from the specific category for the record. 257 + @param policy a dictionary containing the specific policy to be 258 + removed, with the same format as described in addAccountPolicy. 259 + @param category a valid ODPolicyCategoryType from which the policy will be removed. 260 + @param error an optional NSError reference for error details. 261 + @result a BOOL which signifies if the policy removal succeeded, otherwise error is set. 262 + */ 263 + - (BOOL)removeAccountPolicy:(NSDictionary *)policy fromCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 264 + 265 + /*! 266 + @method setAccountPolicies:error: 267 + @abstract This will set the policies for the record. 268 + @discussion This will set the policies for the record, replacing any 269 + existing policies. All of the policies in the set will be 270 + applied to the record when policies are evaluated. 271 + @param policies a dictionary containing all of the policies to be set 272 + for the node. The dictionary may contain the following keys: 273 + kODPolicyCategoryAuthentication an optional key with a value 274 + of an array of policy dictionaries that specify when 275 + authentications should be allowed. 276 + kODPolicyCategoryPasswordContent an optional key with a 277 + value of an array of policy dictionaries the specify the 278 + required content of passwords. 279 + kODPolicyCategoryPasswordChange an optional key with a value 280 + of an array of policy dictionaries that specify when 281 + passwords are required to be changed. 282 + @param error an optional NSError reference for error details. 283 + @result a BOOL which signifies if the policy set succeeded, otherwise error is set. 284 + */ 285 + - (BOOL)setAccountPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 286 + 287 + /*! 288 + @method accountPoliciesAndReturnError: 289 + @abstract Returns a dictionary containing any policies configured for the record. 290 + @discussion Returns a dictionary containing any policies configured for the record. 291 + Does not include any policies set for the node. 292 + @discussion Returns a dictionary containing any policies configured for the record. 293 + @param error an optional NSError reference for error details. 294 + @result a NSDictionary containing all currently set policies. The 295 + format of the dictionary is the same as described in 296 + setAccountPolicies. 297 + */ 298 + - (NSDictionary *)accountPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 299 + 300 + /*! 301 + @function authenticationAllowedAndReturnError: 302 + @abstract Determines if policies allow the account to authenticate. 303 + @discussion Determines if policies allow the account to authenticate. 304 + Authentication and password change policies are evaluated. 305 + Record-level and node-level policies are evaluated in 306 + combination, with record-level taking precedence over node-level 307 + policies. The failure of any single policy will deny the 308 + authentication. 309 + 310 + This check is only definitive at the time it was requested. The 311 + policy or the environment could change before the authentication 312 + is actually requested. Errors from the authentication request 313 + should be consulted. 314 + 315 + It is not necessary to call this function when calling 316 + verifyPassword or verifyPasswordExtended since those methods 317 + perform the same policy evaluation. 318 + 319 + @param error an optional NSError reference for error details. 320 + @result a bool which signifies if the authentication is allowed, otherwise error is set. 321 + */ 322 + - (BOOL)authenticationAllowedAndReturnError:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 323 + 324 + /*! 325 + @method passwordChangeAllowed:error: 326 + @abstract Determines if policies allow the password change. 327 + @discussion Determines if policies allow the password change. Password 328 + content policies are evaluated. Record-level and node-level 329 + policies are evaluated in combination, with record-level taking 330 + precedence over node-level policies. The failure of any single 331 + policy will deny the password change. 332 + 333 + This check is only definitive at the time it was requested. The 334 + policy or the environment could change before the password change 335 + is actually requested. Errors from the password change request 336 + should be consulted. 337 + 338 + @param newPassword contains the password to be evaluated. 339 + @param error an optional NSError reference for error details. 340 + @result a BOOL which signifies if the password change is allowed, otherwise error is set. 341 + */ 342 + - (BOOL)passwordChangeAllowed:(NSString *)newPassword error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 343 + 344 + /*! 345 + @method willPasswordExpire: 346 + @abstract Determines if the password will expire within the specified time. 347 + @discussion Determines if the password will expire (i.e. need to be changed) 348 + between now and the specified number of seconds in the future. 349 + Password change policies are evaluated. Record-level and 350 + node-level policies are evaluated in combination, with 351 + record-level taking precedence over node-level policies. 352 + @param willExpireIn the number of seconds from the current time to be 353 + used as the upper-bound for the password expiration period. 354 + @result a BOOL which signifies if the password will expire within the 355 + specified time. 356 + */ 357 + - (BOOL)willPasswordExpire:(uint64_t)willExpireIn __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 358 + 359 + /*! 360 + @method willAuthenticationsExpire: 361 + @abstract Determines if authentications will expire within the specified time. 362 + @discussion Determines if authentications will expire (i.e. session and/or 363 + account expires) between now and the specified number of seconds 364 + in the future. Authentication policies are evaluated. 365 + Record-level and node-level policies are evaluated in 366 + combination, with record-level taking precedence over node-level 367 + policies. 368 + @param willExpireIn the number of seconds from the current time to be 369 + used as the upper-bound for the authentication expiration period. 370 + @result a BOOL which signifies if authentications will expire within the 371 + specified time. 372 + */ 373 + - (BOOL)willAuthenticationsExpire:(uint64_t)willExpireIn __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 374 + 375 + /*! 376 + @method secondsUntilPasswordExpires 377 + @abstract Determines how many seconds until the password expires. 378 + @discussion Determines how many seconds until the password expires (i.e. 379 + needs changing). Password change policies are evaluated. 380 + Record-level and node-level policies are evaluated in 381 + combination, with record-level taking precedence over node-level 382 + policies. 383 + @result the number of seconds until the password expires. If multiple 384 + policies will cause the password to expire, the soonest 385 + expiration time is returned. If already expired, 386 + kODExpirationTimeExpired is returned. If there are no password 387 + change policies, kODExpirationTimeNeverExpires is returned. 388 + */ 389 + @property (readonly) int64_t secondsUntilPasswordExpires __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 390 + 391 + /*! 392 + @method secondsUntilAuthenticationsExpire 393 + @abstract Determines how many seconds until authentications expire. 394 + @discussion Determines how many seconds until authentications expire (i.e. 395 + session and/or account expires). Authentication policies are 396 + evaluated. Record-level and node-level policies are evaluated 397 + in combination, with record-level taking precedence over 398 + node-level policies. 399 + @result the number of seconds until authentications expire. If multiple 400 + policies will cause authentications to expire, the soonest 401 + expiration time is returned. If already expired, 402 + kODExpirationTimeExpired is returned. If there are no 403 + authentication policies controlling expiration, 404 + kODExpirationTimeNeverExpires is returned. 405 + */ 406 + @property (readonly) int64_t secondsUntilAuthenticationsExpire __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA); 407 + 408 + @end 409 + 410 + /*! 411 + @category ODRecord (ODRecordGroupExtensions) 412 + @discussion Record extensions for checking and modifying group membership. 413 + */ 414 + @interface ODRecord (ODRecordGroupExtensions) 415 + 416 + /*! 417 + @method addMemberRecord:error: 418 + @abstract Will add the record as a member of the group record 419 + @discussion Will add the record as a member of the group record. An error will be returned if the record is not 420 + a group record. Additionally, if the member record is not an appropriate type allowed as part of a group 421 + an error will be returned. outError is optional parameter, nil can be passed if error details are not needed. 422 + */ 423 + - (BOOL)addMemberRecord:(ODRecord *)inRecord error:(NSError **)outError NS_AVAILABLE(10_6, NA); 424 + 425 + /*! 426 + @method removeMemberRecord:error: 427 + @abstract Will remove the record as a member from the group record 428 + @discussion Will remove the record as a member from the group record. An error will be returned if the record is not 429 + a group record. Additionally, if the member record is not an appropriate type allowed as part of a group 430 + an error will be returned. outError is optional parameter, nil can be passed if error details are not needed. 431 + */ 432 + - (BOOL)removeMemberRecord:(ODRecord *)inRecord error:(NSError **)outError NS_AVAILABLE(10_6, NA); 433 + 434 + /*! 435 + @method isMemberRecord:error: 436 + @abstract Will use membership APIs to determine if inRecord is a member of the group 437 + @discussion Will use membership APIs to determine if inRecord is a member of the group. If the receiving 438 + object is not a group then NO will still be returned. outError is optional parameter, nil can be passed if 439 + error details are not needed. 440 + */ 441 + - (BOOL)isMemberRecord:(ODRecord *)inRecord error:(NSError **)outError NS_AVAILABLE(10_6, NA); 442 + 443 + @end
+92
src/OpenDirectory/Headers/ODRecordMap.h
··· 1 + /* 2 + * Copyright (c) 2012 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #import <Foundation/Foundation.h> 25 + 26 + @class ODAttributeMap; 27 + 28 + NS_CLASS_AVAILABLE_MAC(10_9) 29 + @interface ODRecordMap : NSObject { 30 + @protected 31 + NSString *native; 32 + NSDictionary *odPredicate; 33 + NSMutableDictionary *attributes; 34 + } 35 + 36 + /* native value for this attribute, if not present, translation function or preformed OD predicate must be present */ 37 + @property(copy) NSString *native NS_AVAILABLE_MAC(10_9); 38 + 39 + /* 40 + * preformed OD-style predicate that defines a query for a specific record type 41 + * 42 + * predicate dictionary: 43 + * attribute : <native attribute> 44 + * values : [ <value> ] # note multiple values will be treated as AND 45 + * matchtype : <value from kODMatchEqualTo(0x2001) | kODMatchBeginsWith(0x2002) | kODMatchContains(0x2003) | kODMatchEndsWith(0x2004)> 46 + * 47 + * nested predicates 48 + * operator : { OR | AND | NOT } 49 + * predicates : [ <predicate>, ... ] 50 + */ 51 + @property(copy) NSDictionary *odPredicate NS_AVAILABLE_MAC(10_9); 52 + 53 + /* dictionary of OpenDirectory standard attributes as a key and a value of ODAttributeMap */ 54 + @property(readonly, copy) NSDictionary *attributes NS_AVAILABLE_MAC(10_9); 55 + 56 + /* returns an array of NSStrings that list the attributes for this recordmap */ 57 + @property(readonly, copy) NSArray *standardAttributeTypes NS_AVAILABLE_MAC(10_9); 58 + 59 + /*! 60 + * @method recordMap 61 + * 62 + * @abstract 63 + * Returns an initialized and autoreleased ODRecordMap object. 64 + * 65 + * @discussion 66 + * Returns an initialized and autoreleased ODRecordMap object. 67 + */ 68 + + (instancetype)recordMap; 69 + 70 + /*! 71 + * @method attributeMapForStandardAttribute: 72 + * 73 + * @abstract 74 + * Returns an ODAttributeMap object for the given OD standard attribute. 75 + * 76 + * @discussion 77 + * Returns an ODAttributeMap object for the given OD standard attribute. 78 + */ 79 + - (ODAttributeMap *)attributeMapForStandardAttribute:(NSString *)standardAttribute NS_AVAILABLE_MAC(10_9); 80 + 81 + /*! 82 + * @method setAttributeMap:forStandardAttribute: 83 + * 84 + * @abstract 85 + * Sets an ODAttributeMap object for a given OD standard attribute. 86 + * 87 + * @discussion 88 + * Sets an ODAttributeMap object for a given OD standard attribute. 89 + */ 90 + - (void)setAttributeMap:(ODAttributeMap *)attributeMap forStandardAttribute:(NSString *)standardAttribute NS_AVAILABLE_MAC(10_9); 91 + 92 + @end
+196
src/OpenDirectory/Headers/ODSession.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + @class SFAuthorization; 25 + 26 + /*! 27 + @const ODSessionProxyAddress 28 + @abstract the address to connect to via proxy, used when making the options dictionary 29 + @discussion the address to connect to via proxy, used when making the options dictionary 30 + */ 31 + FOUNDATION_EXPORT NSString *const ODSessionProxyAddress NS_AVAILABLE(10_6, NA); 32 + 33 + /*! 34 + @const ODSessionProxyPort 35 + @abstract the port to connect to via proxy, used when making the options dictionary 36 + @discussion the port to connect to via proxy, used when making the options dictionary. This parameter 37 + is optional and should not be passed normally. 38 + */ 39 + FOUNDATION_EXPORT NSString *const ODSessionProxyPort NS_AVAILABLE(10_6, NA); 40 + 41 + /*! 42 + @const ODSessionProxyUsername 43 + @abstract the username to connect with via proxy, used when making the options dictionary 44 + @discussion the username to connect with via proxy, used when making the options dictionary 45 + */ 46 + FOUNDATION_EXPORT NSString *const ODSessionProxyUsername NS_AVAILABLE(10_6, NA); 47 + 48 + /*! 49 + @const ODSessionProxyPassword 50 + @abstract the password to connect with via proxy, used when making the options dictionary 51 + @discussion the password to connect with via proxy, used when making the options dictionary 52 + */ 53 + FOUNDATION_EXPORT NSString *const ODSessionProxyPassword NS_AVAILABLE(10_6, NA); 54 + 55 + @class ODConfiguration; 56 + 57 + /*! 58 + @class ODSession 59 + @abstract Class for working with OpenDirectory sessions. 60 + @discussion Class for working with OpenDirectory sessions. 61 + */ 62 + @interface ODSession : NSObject { 63 + @private 64 + void *_internal; 65 + } 66 + 67 + /*! 68 + @method defaultSession 69 + @abstract Returns a shared instance of a local ODSession 70 + @discussion Returns a shared instance of a local ODSession. This can be used for most situations unless 71 + more control is needed over the session. 72 + */ 73 + + (ODSession *)defaultSession NS_AVAILABLE(10_6, NA); 74 + 75 + /*! 76 + @method sessionWithOptions:error: 77 + @abstract Creates an autoreleased instance of ODSession directed over Proxy to another host 78 + @discussion Creates an autoreleased instance of ODSession directed over Proxy to another host. nil 79 + can be passed for no options. outError is optional parameter, nil can be passed if error 80 + details are not needed. Options include: 81 + 82 + If proxy is required then a dictionary with keys should be: 83 + Key Value 84 + ODSessionProxyAddress NSString(hostname or IP) 85 + ODSessionProxyPort NSNumber(IP port, should not be set as it will default) 86 + ODSessionProxyUsername NSString(username) 87 + ODSessionProxyPassword NSString(password) 88 + */ 89 + + (instancetype)sessionWithOptions:(NSDictionary *)inOptions error:(NSError **)outError NS_AVAILABLE(10_6, NA); 90 + 91 + /*! 92 + @method initWithOptions:error: 93 + @abstract Creates an instance of ODSession directed over Proxy to another host 94 + @discussion Creates an instance of ODSession directed over Proxy to another host. nil can be 95 + passed for no options. outError is optional parameter, nil can be passed if error 96 + details are not needed. Options include: 97 + 98 + If proxy is required then a dictionary with keys should be: 99 + Key Value 100 + ODSessionProxyAddress NSString(hostname or IP) 101 + ODSessionProxyPort NSNumber(IP port, should not be set as it will default) 102 + ODSessionProxyUsername NSString(username) 103 + ODSessionProxyPassword NSString(password) 104 + */ 105 + - (instancetype)initWithOptions:(NSDictionary *)inOptions error:(NSError **)outError NS_AVAILABLE(10_6, NA); 106 + 107 + /*! 108 + @method nodeNamesAndReturnError: 109 + @abstract Returns the node names that are registered on this ODSession 110 + @discussion Returns the node names that are registered on this ODSession. outError can be nil if 111 + error details are not needed. 112 + */ 113 + - (NSArray *)nodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA); 114 + 115 + /*! 116 + * @method configurationTemplateNames 117 + * 118 + * @abstract 119 + * Returns a list of names as NSStrings for all available configuration templates. 120 + * 121 + * @discussion 122 + * Returns a list of names as NSStrings for all available configuration templates. Configuration templates 123 + * have pre-configured modules and/or mappings. Useful for re-using existing configurations 124 + * that may change with operating system without changing the actual configuration. 125 + */ 126 + @property (readonly, copy) NSArray *configurationTemplateNames NS_AVAILABLE_MAC(10_9); 127 + 128 + /*! 129 + * @method mappingTemplateNames 130 + * 131 + * @abstract 132 + * Returns a list names as NSStrings for all available mapping templates. 133 + * 134 + * @discussion 135 + * Returns a list names as NSStrings for all available mapping templates. Mapping templates have pre-configured 136 + * record/attribute mappings. Useful if a configuration uses a common layout of mappings for a type of server. 137 + */ 138 + @property (readonly, copy) NSArray *mappingTemplateNames NS_AVAILABLE_MAC(10_9); 139 + 140 + /*! 141 + * @method configurationAuthorizationAllowingUserInteraction: 142 + * 143 + * @abstract 144 + * Returns an authorization appropriate for managing configurations. 145 + * 146 + * @discussion 147 + * Returns an authorization appropriate for managing configurations. If a proxy session is in use this method will return 148 + * nil and no error. 149 + */ 150 + - (SFAuthorization *)configurationAuthorizationAllowingUserInteraction:(BOOL)allowInteraction error:(NSError **)error NS_AVAILABLE_MAC(10_9); 151 + 152 + /*! 153 + * @method configurationForNodename: 154 + * 155 + * @abstract 156 + * Reads the configuration for a given nodename. 157 + * 158 + * @discussion 159 + * Reads the configuration for a given nodename. 160 + */ 161 + - (ODConfiguration *)configurationForNodename:(NSString *)nodename NS_AVAILABLE_MAC(10_9); 162 + 163 + /*! 164 + * @method addConfiguration:authorization:error: 165 + * 166 + * @abstract 167 + * Adds a new configuration to the existing ODSession. 168 + * 169 + * @discussion 170 + * Adds a new configuration to the existing ODSession. An SFAuthorization can be provided if necessary. 171 + */ 172 + - (BOOL) addConfiguration:(ODConfiguration *)configuration authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 173 + 174 + /*! 175 + * @method deleteConfiguration:authorization:error: 176 + * 177 + * @abstract 178 + * Deletes an existing configuration from the ODSession. 179 + * 180 + * @discussion 181 + * Deletes an existing configuration from the ODSession. An authorization can be provided if necessary. 182 + */ 183 + - (BOOL) deleteConfiguration:(ODConfiguration *)configuration authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 184 + 185 + /*! 186 + * @method deleteConfigurationWithNodename:authorization:error: 187 + * 188 + * @abstract 189 + * Deletes an existing configuration from the ODSession. 190 + * 191 + * @discussion 192 + * Deletes an existing configuration from the ODSession. An authorization can be provided if necessary. 193 + */ 194 + - (BOOL) deleteConfigurationWithNodename:(NSString *)nodename authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9); 195 + 196 + @end
+44
src/OpenDirectory/Headers/OpenDirectory.h
··· 1 + /* 2 + * Copyright (c) 2009 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. Please obtain a copy of the License at 10 + * http://www.opensource.apple.com/apsl/ and read it before using this 11 + * file. 12 + * 13 + * The Original Code and all software distributed under the License are 14 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 + * Please see the License for the specific language governing rights and 19 + * limitations under the License. 20 + * 21 + * @APPLE_LICENSE_HEADER_END@ 22 + */ 23 + 24 + #if __OBJC__ 25 + #import <Foundation/Foundation.h> 26 + #endif /* __OBJC__ */ 27 + 28 + #include <CFOpenDirectory/CFOpenDirectory.h> 29 + 30 + #if __OBJC__ 31 + 32 + FOUNDATION_EXPORT NSString *const ODFrameworkErrorDomain NS_AVAILABLE(10_6, NA); 33 + 34 + #import <OpenDirectory/ODSession.h> 35 + #import <OpenDirectory/ODRecord.h> 36 + #import <OpenDirectory/ODNode.h> 37 + #import <OpenDirectory/ODQuery.h> 38 + #import <OpenDirectory/ODConfiguration.h> 39 + #import <OpenDirectory/ODMappings.h> 40 + #import <OpenDirectory/ODRecordMap.h> 41 + #import <OpenDirectory/ODAttributeMap.h> 42 + #import <OpenDirectory/ODModuleEntry.h> 43 + 44 + #endif /* __OBJC__ */
+1
src/OpenDirectory/OpenDirectory
··· 1 + Headers
+36 -61
src/dyld/darling.c
··· 43 43 const char* DARLING_INIT_COMM = "darling-init"; 44 44 char *prefix; 45 45 uid_t g_originalUid, g_originalGid; 46 + char **g_argv, **g_envp; 46 47 47 - int main(int argc, char const ** argv) 48 + int main(int argc, char ** argv, char ** envp) 48 49 { 49 50 pid_t pidInit, pidChild; 50 51 int wstatus; ··· 55 56 return 1; 56 57 } 57 58 59 + g_argv = argv; 60 + g_envp = envp; 61 + 58 62 if (geteuid() != 0) 59 63 { 60 64 missingSetuidRoot(); 61 65 return 1; 62 66 } 63 67 64 - if (loadKernelModule()) 65 - return 1; 66 - 67 68 g_originalUid = getuid(); 68 69 g_originalGid = getgid(); 69 70 71 + setuid(0); 72 + setgid(0); 73 + 74 + if (!isModuleLoaded()) 75 + loadKernelModule(); 76 + 70 77 prefix = getenv("DPREFIX"); 71 78 if (!prefix) 72 79 prefix = defaultPrefixPath(); ··· 89 96 }; 90 97 int option_index = 0; 91 98 92 - c = getopt_long(argc, (char *const *)argv, "", long_options, &option_index); 99 + c = getopt_long(argc, argv, "", long_options, &option_index); 93 100 94 101 if (c == -1) 95 102 { ··· 200 207 201 208 waitpid(pidChild, &wstatus, 0); 202 209 203 - // Should we unloadKernelModule() here? Others may be still using it 204 210 if (WIFEXITED(wstatus)) 205 211 return WEXITSTATUS(wstatus); 206 212 if (WIFSIGNALED(wstatus)) ··· 275 281 exit(1); 276 282 } 277 283 */ 278 - 279 - setresuid(g_originalUid, g_originalUid, g_originalUid); 284 + 285 + // Drop the privileges. It's important to drop GID first, because 286 + // non-root users can't change their GID. 280 287 setresgid(g_originalGid, g_originalGid, g_originalGid); 288 + setresuid(g_originalUid, g_originalUid, g_originalUid); 281 289 282 290 /* 283 291 if (setns(fdNS, CLONE_NEWUSER) != 0) ··· 403 411 404 412 char *opts; 405 413 char putOld[4096]; 414 + char *p; 406 415 407 416 close(pipefd[0]); 408 417 ··· 449 458 exit(1); 450 459 } 451 460 452 - // Drop the privileges 453 - setresuid(g_originalUid, g_originalUid, g_originalUid); 461 + // Drop the privileges. It's important to drop GID first, because 462 + // non-root users can't change their GID. 454 463 setresgid(g_originalGid, g_originalGid, g_originalGid); 464 + setresuid(g_originalUid, g_originalUid, g_originalUid); 455 465 prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); 456 466 467 + // Set name to darling-init 457 468 prctl(PR_SET_NAME, DARLING_INIT_COMM, 0, 0); 469 + p = stpcpy(g_argv[0], DARLING_INIT_COMM); 470 + memset(p, 0, g_envp[0] - p); 458 471 459 472 /* 460 473 if (unshare(CLONE_NEWUSER) != 0) ··· 840 853 return 0; 841 854 } 842 855 843 - int loadKernelModule() 856 + void loadKernelModule() 844 857 { 845 - int fd; 846 - // We need to check two paths due to DKMS 847 - // Ubuntu overrides our dkms.conf and forces the modules into the updates folder 848 - char miscpath[128], updatespath[128]; 849 - char* path; 850 - struct utsname name; 851 - 852 - if (isModuleLoaded()) 853 - return 0; 858 + int status; 859 + FILE *fp = popen("/sbin/modprobe darling-mach", "w"); 854 860 855 - uname(&name); 856 - snprintf(miscpath, sizeof(miscpath), "/lib/modules/%s/kernel/misc/darling-mach.ko", name.release); 857 - snprintf(updatespath, sizeof(updatespath), "/lib/modules/%s/updates/dkms/darling-mach.ko", name.release); 858 - 859 - // Since miscpath is the normal location we check for it last 860 - if(access(updatespath, F_OK) == 0) 861 + if (fp == NULL) 861 862 { 862 - path = updatespath; 863 - } 864 - else if (access(miscpath, F_OK)) 865 - { 866 - fprintf(stderr, "Cannot find kernel module at %s: %s\n", path, strerror(errno)); 867 - return 1; 868 - } 869 - else 870 - { 871 - path = miscpath; 872 - } 873 - 874 - fd = open(path, O_RDONLY); 875 - if (fd < 0) 876 - { 877 - fprintf(stderr, "Cannot open kernel module\n"); 878 - return 1; 863 + fprintf(stderr, "Failed to run modprobe: %s\n", strerror(errno)); 864 + exit(1); 879 865 } 880 866 881 - if (syscall(SYS_finit_module, fd, "", 0)) 867 + status = pclose(fp); 868 + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) 882 869 { 883 - fprintf(stderr, "Cannot load kernel module: %s\n", strerror(errno)); 884 - return 1; 870 + fprintf(stderr, "Loaded the kernel module\n"); 871 + return; 885 872 } 886 - 887 - printf("Loaded kernel module: %s\n", path); 888 - 889 - close(fd); 890 - 891 - return 0; 892 - } 893 - 894 - int unloadKernelModule() 895 - { 896 - if(syscall(SYS_delete_module, "darling_mach", 0)) 873 + else 897 874 { 898 - fprintf(stderr, "Cannot unload kernel module: %s\n", strerror(errno)); 899 - return 1; 875 + fprintf(stderr, "Failed to load the kernel module\n"); 876 + exit(1); 900 877 } 901 - 902 - return 0; 903 878 }
+1 -3
src/dyld/darling.h
··· 64 64 65 65 int isModuleLoaded(void); 66 66 67 - int loadKernelModule(void); 68 - 69 - int unloadKernelModule(void); 67 + void loadKernelModule(void); 70 68 71 69 #endif