• Stephen D. Smalley's avatar
    [PATCH] Replace inode_post_lookup hook with d_instantiate hook · 4f152a7e
    Stephen D. Smalley authored
    This patch removes the security_inode_post_lookup hook entirely and
    adds a security_d_instantiate hook call to the d_instantiate function
    and the d_splice_alias function.  The inode_post_lookup hook was
    subject to races since the inode is already accessible through the
    dcache before it is called, didn't handle filesystems that directly
    populate the dcache, and wasn't always called in the desired context
    (e.g. for pipe, shmem, and devpts inodes).  The d_instantiate hook
    enables initialization of the inode security information.  This hook
    is used by SELinux and by DTE to setup the inode security state, and
    eliminated the need for the inode_precondition function in SELinux.
    4f152a7e
dummy.c 15.9 KB