Commit 8012495e authored by José Bollo's avatar José Bollo Committed by Casey Schaufler

smack: fix cache of access labels

Before this commit, removing the access property of
a file, aka, the extended attribute security.SMACK64
was not effictive until the cache had been cleaned.

This patch fixes that problem.
Signed-off-by: default avatarJosé Bollo <jobol@nonadev.net>
Acked-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent 491a0b08
...@@ -1442,9 +1442,13 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name) ...@@ -1442,9 +1442,13 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name)
* Don't do anything special for these. * Don't do anything special for these.
* XATTR_NAME_SMACKIPIN * XATTR_NAME_SMACKIPIN
* XATTR_NAME_SMACKIPOUT * XATTR_NAME_SMACKIPOUT
* XATTR_NAME_SMACKEXEC
*/ */
if (strcmp(name, XATTR_NAME_SMACK) == 0) if (strcmp(name, XATTR_NAME_SMACK) == 0) {
struct super_block *sbp = d_backing_inode(dentry)->i_sb;
struct superblock_smack *sbsp = sbp->s_security;
isp->smk_inode = sbsp->smk_default;
} else if (strcmp(name, XATTR_NAME_SMACKEXEC) == 0)
isp->smk_task = NULL; isp->smk_task = NULL;
else if (strcmp(name, XATTR_NAME_SMACKMMAP) == 0) else if (strcmp(name, XATTR_NAME_SMACKMMAP) == 0)
isp->smk_mmap = NULL; isp->smk_mmap = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment