BACKPORT: bugfix patch for SMACK
authorPankaj Kumar <pankaj.k2@samsung.com>
Fri, 13 Dec 2013 09:42:22 +0000 (15:12 +0530)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:34 +0000 (14:57 +0200)
commit6436d98100e21a4e2cedc6d17968c86a714afdfc
tree587c5d3d61449ab7c873b88f2b722ebaf461788f
parent5c86b661f1351b96a01d1f27fa8ce12ad0865c07
BACKPORT: bugfix patch for SMACK

1. In order to remove any SMACK extended attribute from a file, a user
should have CAP_MAC_ADMIN capability. But user without having this
capability is able to remove SMACK64MMAP security attribute.

2. While validating size and value of smack extended attribute in
smack_inode_setsecurity hook, wrong error code is returned.

Signed-off-by: Pankaj Kumar <pamkaj.k2@samsung.com>
Signed-off-by: Himanshu Shukla <himanshu.sh@samsung.com>
(cherry-picked from upstream 5e9ab593c2da3064136ffa1d7f712d0e957e1958)
security/smack/smack_lsm.c