pub fn dentry_init_security(
current_task: &CurrentTask,
parent: &FsNode,
mode: FileMode,
name: &FsStr,
) -> Result<Option<FsNodeSecurityXattr>, Errno>Expand description
Called by remote file-system implementations before creating a new FsNode with mode and
name under parent, to obtain the extended attribute with which the new node should be
labeled, so that it can be supplied to the remote file-system inline with the creation request.
Once the node has been created, the file-system implementation should call
fs_node_notify_security_context() with the attribute’s value, so that the node’s security
state reflects the label that was applied remotely.
Returns Ok(None) if SELinux is not enabled, no policy has yet been loaded, or the file-system
does not persist labels as extended attributes.
Corresponds to the dentry_init_security() LSM hook.