• Stephen Smalley's avatar
    selinux: stop passing MAY_NOT_BLOCK to the AVC upon follow_link · e46e01ee
    Stephen Smalley authored
    commit bda0be7a ("security: make inode_follow_link RCU-walk aware")
    switched selinux_inode_follow_link() to use avc_has_perm_flags() and
    pass down the MAY_NOT_BLOCK flag if called during RCU walk.  However,
    the only test of MAY_NOT_BLOCK occurs during slow_avc_audit()
    and only if passing an inode as audit data (LSM_AUDIT_DATA_INODE).  Since
    selinux_inode_follow_link() passes a dentry directly, passing MAY_NOT_BLOCK
    here serves no purpose.  Switch selinux_inode_follow_link() to use
    avc_has_perm() and drop avc_has_perm_flags() since there are no other
    users.
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
    e46e01ee
avc.h 5.04 KB