]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: LSM stacking: fixup procsfs: add smack subdir to attrs
authorJohn Johansen <john.johansen@canonical.com>
Thu, 31 Aug 2017 23:34:12 +0000 (16:34 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 20:54:21 +0000 (16:54 -0400)
commit4b84c3ba70eee22ac0962b64fecafc25ad7d69c4
tree9fdcb3ef46e36614e52a883e2ba2ab0b7cc3005a
parent44559d36748661d9baf344ccaa7eb19193c284fa
UBUNTU: SAUCE: LSM stacking: fixup procsfs: add smack subdir to attrs

The patch that adds the smack subdirs also changes how set_procattr
is handled. It makes the assumption that each LSM will attempt
to handle the context written in turn and return ENOENT, if
the LSM doesn't handle the context and another should try.

This is wrong in two ways, LSMs may return ENOENT as an error for
a context that is valid but is not present in currently loaded
policy, and the code is based on earlier versions where each
LSM is tried in turn.

Under the current patchset there is the concept of the current LSM
which will be used by applications using the old interfaces, to
ensure those interfaces which were not designed for multiple LSM
input/out only ever have to deal with a single LSM.

Fixes: 86400b03f812 ("procfs: add smack subdir to attrs")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/security.c