diff options
Diffstat (limited to 'meta-sota-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-smack-fix-cache-of-access-labels.patch')
-rw-r--r-- | meta-sota-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-smack-fix-cache-of-access-labels.patch | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/meta-sota-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-smack-fix-cache-of-access-labels.patch b/meta-sota-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-smack-fix-cache-of-access-labels.patch deleted file mode 100644 index c516f3a..0000000 --- a/meta-sota-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-smack-fix-cache-of-access-labels.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 99267706991ab84bd44ceaea9a7ec886bbdd58e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jobol@nonadev.net> | ||
3 | Date: Tue, 12 Jan 2016 21:23:40 +0100 | ||
4 | Subject: [PATCH 2/4] smack: fix cache of access labels | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Before this commit, removing the access property of | ||
10 | a file, aka, the extended attribute security.SMACK64 | ||
11 | was not effictive until the cache had been cleaned. | ||
12 | |||
13 | This patch fixes that problem. | ||
14 | |||
15 | Signed-off-by: José Bollo <jobol@nonadev.net> | ||
16 | Acked-by: Casey Schaufler <casey@schaufler-ca.com> | ||
17 | --- | ||
18 | security/smack/smack_lsm.c | 8 ++++++-- | ||
19 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c | ||
22 | index b20ef06..b2bcb14 100644 | ||
23 | --- a/security/smack/smack_lsm.c | ||
24 | +++ b/security/smack/smack_lsm.c | ||
25 | @@ -1444,9 +1444,13 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name) | ||
26 | * Don't do anything special for these. | ||
27 | * XATTR_NAME_SMACKIPIN | ||
28 | * XATTR_NAME_SMACKIPOUT | ||
29 | - * XATTR_NAME_SMACKEXEC | ||
30 | */ | ||
31 | - if (strcmp(name, XATTR_NAME_SMACK) == 0) | ||
32 | + if (strcmp(name, XATTR_NAME_SMACK) == 0) { | ||
33 | + struct super_block *sbp = d_backing_inode(dentry)->i_sb; | ||
34 | + struct superblock_smack *sbsp = sbp->s_security; | ||
35 | + | ||
36 | + isp->smk_inode = sbsp->smk_default; | ||
37 | + } else if (strcmp(name, XATTR_NAME_SMACKEXEC) == 0) | ||
38 | isp->smk_task = NULL; | ||
39 | else if (strcmp(name, XATTR_NAME_SMACKMMAP) == 0) | ||
40 | isp->smk_mmap = NULL; | ||
41 | -- | ||
42 | 2.7.4 | ||
43 | |||