Skip to main content

dentry_create_files_as

Function dentry_create_files_as 

Source
pub fn dentry_create_files_as(
    current_task: &CurrentTask,
    parent: &FsNode,
    new_node_mode: FileMode,
    new_node_name: &FsStr,
    new_creds: &mut Credentials,
) -> Result<(), Errno>
Expand description

Called by specialist file-system implementations before creating a new FsNode, to obtain the SID with which the code will be labeled, in advance.

The computed SID will be applied to the fscreate_sid field of the supplied new_creds, which may then be used with CurrentTask::override_creds() to later create the new node.

Corresponds to the dentry_create_files_as() LSM hook.