Initialize and validate file creation parameters with respect to the current context.
- macOS 10.4+
The directory in which creation will occur.
Pointer to vnode_attr struct containing desired attributes to set and their values.
If 1, treat the caller as the superuser, i.e. do not check permissions.
Context for which to authorize actions.
KAUTH_RESULT_ALLOW for success, an error to indicate invalid or disallowed attributes.
vnode_authattr_new() will fill in unitialized values in the vnode_attr struct with defaults, and will validate the structure with respect to the current context for file creation.