Function

SecAccessCreateWithOwnerAndACL

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

Declaration

SecAccessRef SecAccessCreateWithOwnerAndACL(uid_t userId, gid_t groupId, SecAccessOwnerType ownerType, CFArrayRef acls, CFErrorRef  _Nullable *error);

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 CFErrorRef instance that provides more information.

Return Value

The new access instance. Call the CFRelease function to release it when you are finished using it.

Discussion

Use this method to create a customized access instance from SecACLRef 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

SecAccessCreate

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

SecAccessOwnerType

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

SecAccessOwnerType Values

Flags that enable you to configure ACL ownership.

SecAccessRef

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

SecAccessGetTypeID

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