BACKPORT: Smack: Lock mode for the floor and hat labels
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 9 Oct 2014 23:18:55 +0000 (16:18 -0700)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:41 +0000 (14:57 +0200)
commitcb2d9ebbd379d0e7eb86fd5047f09133767b2830
tree5ca4cd679084ce4e392ad92f541d7e2ad0a58377
parentb86349ff0d7f9d23ba44669623e71ee3b676f2d8
BACKPORT: Smack: Lock mode for the floor and hat labels

The lock access mode allows setting a read lock on a file
for with the process has only read access. The floor label is
defined to make it easy to have the basic system installed such
that everyone can read it. Once there's a desire to read lock
(rationally or otherwise) a floor file a rule needs to get set.
This happens all the time, so make the floor label a little bit
more special and allow everyone lock access, too. By implication,
give processes with the hat label (hat can read everything)
lock access as well. This reduces clutter in the Smack rule set.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
(cherry-picked from upstream 6c892df2686c5611979792aaa4ddea9ee9f18749)
security/smack/smack_access.c