Function

SecAccessCreateWithOwnerAndACL(_:_:_:_:_:)

Creates a new access instance using the owner and ACL entries you provide.

Declaration

func SecAccessCreateWithOwnerAndACL(_ userId: uid_t, _ groupId: gid_t, _ ownerType: SecAccessOwnerType, _ acls: CFArray?, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> SecAccess?

Parameters

userId

The user ID that owns this ACL.

groupId

The group ID that owns this ACL.

ownerType

Flags that control whether the specified user ID or group ID owns the resulting ACL. See SecAccessOwnerType for details.

acls

An array of ACL entries to associate with the access instance.

error

The address of an error instance. On error, the return value is nil, and the variable referenced by this parameter is overwritten with a CFError instance that provides more information.

Return Value

The new access instance.

Discussion

Use this method to create a customized access instance from SecACL instances that you’ve created with the SecACLCreateWithSimpleContents(_:_:_:_:_:) method. If you want a default access instance, use the SecAccessCreate(_:_:_:) method instead.

See Also

Access Creation

func SecAccessCreate(CFString, CFArray?, UnsafeMutablePointer<SecAccess?>) -> OSStatus

Creates a new access instance associated with a given protected keychain item.

typealias SecAccessOwnerType

A type for flags that enable you to configure ACL ownership.

SecAccessOwnerType Values

Flags that enable you to configure ACL ownership.

class SecAccess

An opaque type that identifies a keychain item’s access information.

func SecAccessGetTypeID() -> CFTypeID

Returns the unique identifier of the opaque type to which an access instance belongs.