smack: fix key permission verification
authorDmitry Kasatkin <d.kasatkin@samsung.com>
Fri, 14 Mar 2014 17:44:49 +0000 (17:44 +0000)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Thu, 18 Sep 2014 11:02:50 +0000 (13:02 +0200)
commit424538354be6c42da48b302ef1ac939931599797
tree5bcc0a247e37aceae370a6530e2bab8694b6aad9
parent5ee6bcc6014f3d271be0db115e92144173c56726
smack: fix key permission verification

For any keyring access type SMACK always used MAY_READWRITE access check.
It prevents reading the key with label "_", which should be allowed for anyone.

This patch changes default access check to MAY_READ and use MAY_READWRITE in only
appropriate cases.

Change-Id: Ie357956730df93058198e2df13ef307ce4e8f675
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
security/smack/smack_lsm.c