]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: make /sys/fs/selinux empty 39398/head
authorKen Dreyer <kdreyer@redhat.com>
Wed, 10 Feb 2021 15:08:51 +0000 (08:08 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Wed, 10 Feb 2021 15:25:10 +0000 (08:25 -0700)
commitf0f96445b2033ba52acc7bc1e99a777f93464d8b
tree15fe3eb634c079250845d17c6e5576bb3b15b9c9
parent6c5ccc10b0eff557f55d22fcfa102cdcae5963da
cephadm: make /sys/fs/selinux empty

When the following conditions are true:

  1) A host has selinux-policy-targeted,
  2) We mount the host's /sys into a privileged container,
  3) The container has SELINUXTYPE=targeted in /etc/selinux/config,
  4) The container does not have an selinux-policy-targeted package,

then SELinux-enabled applications like restorecon or DNF do not work inside
the container.

Resolve this by making /sys/fs/selinux an empty directory.

Fixes: https://tracker.ceph.com/issues/49239
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
src/cephadm/cephadm