From 99804790f0954fc2cf0d20aa4d0a581361d3cfe6 Mon Sep 17 00:00:00 2001 From: Kotaro Hashimoto Date: Fri, 3 Feb 2017 10:23:24 +0900 Subject: Fix issue with bluetooth pairing This patch is ported from meta-agl-extra. Change-Id: I02ef686e9f4ba10f30010397675f46e03d616a33 Signed-off-by: Kotaro Hashimoto --- .../0002-smack-fix-cache-of-access-labels.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch (limited to 'meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch') diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch new file mode 100644 index 000000000..c516f3aa5 --- /dev/null +++ b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch @@ -0,0 +1,43 @@ +From 99267706991ab84bd44ceaea9a7ec886bbdd58e0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Tue, 12 Jan 2016 21:23:40 +0100 +Subject: [PATCH 2/4] smack: fix cache of access labels +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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: José Bollo +Acked-by: Casey Schaufler +--- + security/smack/smack_lsm.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index b20ef06..b2bcb14 100644 +--- a/security/smack/smack_lsm.c ++++ b/security/smack/smack_lsm.c +@@ -1444,9 +1444,13 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name) + * Don't do anything special for these. + * XATTR_NAME_SMACKIPIN + * 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; + else if (strcmp(name, XATTR_NAME_SMACKMMAP) == 0) + isp->smk_mmap = NULL; +-- +2.7.4 + -- cgit 1.2.3-korg