]> git.ipfire.org Git - thirdparty/lxc.git/commit
container.conf: Add option to set keyring SELinux context
authorMaximilian Blenk <Maximilian.Blenk@bmw.de>
Wed, 29 Jan 2020 16:09:50 +0000 (17:09 +0100)
committerMaximilian Blenk <Maximilian.Blenk@bmw.de>
Fri, 31 Jan 2020 13:33:01 +0000 (14:33 +0100)
commit4fef78bc332a2d186dca6f1c29952a0ec5423217
treeb9d34821e1296569f313053e0361f2c4fd74a080
parentf5a15e1e3d92d9c954fe80e5ae931f3685027d38
container.conf: Add option to set keyring SELinux context

lxc set's up a new session keyring for every container by default.
If executed on an SELinux enabled system, by default, the keyring
inherits the label of the creating process. If executed with the
currently available SELinux policy, this means that the keyring
is labeled with the lxc_t type. Applications inside the container,
however, might expect that the keyring is labeled with a certain
context (and will fail to access the keyring if it's not explicitly
allowed in the global policy). This patch introduces the config
option lxc.selinux.context.keyring which enables to specify the
label of the newly created keyring. That is, the keyring can be
labeled with the label expected by the started application.

Signed-off-by: Maximilian Blenk <Maximilian.Blenk@bmw.de>
config/selinux/lxc.te
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c
src/lxc/lsm/lsm.c
src/lxc/lsm/lsm.h
src/lxc/lsm/selinux.c
src/lxc/utils.c
src/lxc/utils.h