mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
security: make LSMs explicitly mask off permissions
SELinux needs to pass the MAY_ACCESS flag so it can handle auditting correctly. Presently the masking of MAY_* flags is done in the VFS. In order to allow LSMs to decide what flags they care about and what flags they don't just pass them all and the each LSM mask off what they don't need. This patch should contain no functional changes to either the VFS or any LSM. Signed-off-by: Eric Paris <[email protected]> Acked-by: Stephen D. Smalley <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
9cfcac810e
commit
d09ca73979
3 changed files with 5 additions and 2 deletions
|
|
@ -598,6 +598,8 @@ static int smack_inode_rename(struct inode *old_inode,
|
|||
static int smack_inode_permission(struct inode *inode, int mask)
|
||||
{
|
||||
struct smk_audit_info ad;
|
||||
|
||||
mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND);
|
||||
/*
|
||||
* No permission to check. Existence test. Yup, it's there.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue