You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran restorecon -nvR /var and notices it would have modified fcontext of some kube files that I think have reasonable fcontexts and that new fcontexts would not be as reasonable.
What did you expect to happen?
Restorecon should not relabel any files if there is no misconfiguration.
How to reproduce it (as minimally and precisely as possible)?
build microshift in Fedora 41
install microshift in Fedora 41
start microshift
run sudo restorecon -nvR -e /var/lib/mock -e /var/cache/mock /var | tee restorecon.txt
Anything else we need to know?
I think this should be tested. Start microshift. Run restorecon against any of the files where microshift data is, and there should note be any changes. This seems to be too limited,
Would relabel /var/lib/kubelet/pods/4f9ad0d6-9a40-44b9-af85-a62af7e9ebe1/volumes/kubernetes.io~projected/kube-api-access-285xq from system_u:object_r:tmpfs_t:s0 to system_u:object_r:container_var_lib_t:s0
Would relabel /var/lib/kubelet/pods/4f9ad0d6-9a40-44b9-af85-a62af7e9ebe1/volumes/kubernetes.io~projected/kube-api-access-285xq/..data from system_u:object_r:container_runtime_tmpfs_t:s0 to system_u:object_r:container_var_lib_t:s0
...
Would relabel /var/lib/kubelet/pods/0802e07b-5854-4c18-ac85-4c9d579a7646/volumes/kubernetes.io~secret/metrics-cert from system_u:object_r:tmpfs_t:s0 to system_u:object_r:container_var_lib_t:s0
Would relabel /var/lib/kubelet/pods/0802e07b-5854-4c18-ac85-4c9d579a7646/volumes/kubernetes.io~secret/metrics-cert/..2025_01_18_13_42_34.2656841619 from system_u:object_r:container_runtime_tmpfs_t:s0 to system_u:object_r:container_var_lib_t:s0
...
The text was updated successfully, but these errors were encountered:
What happened?
I ran
restorecon -nvR /var
and notices it would have modified fcontext of some kube files that I think have reasonable fcontexts and that new fcontexts would not be as reasonable.What did you expect to happen?
Restorecon should not relabel any files if there is no misconfiguration.
How to reproduce it (as minimally and precisely as possible)?
sudo restorecon -nvR -e /var/lib/mock -e /var/cache/mock /var | tee restorecon.txt
Anything else we need to know?
I think this should be tested. Start microshift. Run restorecon against any of the files where microshift data is, and there should note be any changes. This seems to be too limited,
microshift/test/resources/selinux.py
Lines 15 to 32 in cf7ae1b
And this should employ restorecon, as 'ls -Zd` does not catch issues deep in directory structure.
microshift/test/resources/selinux.py
Lines 240 to 251 in cf7ae1b
Environment
microshift version
):MicroShift Version: 4.18.0
Base OCP Version: 4.18.0-0.nightly-2025-01-09-012852
cat /etc/os-release
):NAME="Fedora Linux"
VERSION="41 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=41
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=41
SUPPORT_END=2025-12-15
VARIANT="Workstation Edition"
VARIANT_ID=workstation
uname -a
):Linux test 6.12.8-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 2 19:26:03 UTC 2025 x86_64 GNU/Linux
container-selinux-2.234.2-1.fc41.noarch
selinux-policy-targeted-0:41.28-1.fc41.noarch
Relevant logs
The text was updated successfully, but these errors were encountered: