From 2e560c5e4950e6c22b5acb055dd3769bfbfbc248 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 17 May 2021 06:01:30 -0400 Subject: [PATCH] Fix labels in users homedirs, before overlayfs is supported by default for non root users --- container-selinux.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/container-selinux.spec b/container-selinux.spec index 0f62161..69db0fc 100644 --- a/container-selinux.spec +++ b/container-selinux.spec @@ -24,7 +24,7 @@ Name: container-selinux Epoch: 2 Version: 2.162.1 -Release: 2.dev.git%{shortcommit0}%{?dist} +Release: 3.dev.git%{shortcommit0}%{?dist} License: GPLv2 URL: %{git0} Summary: SELinux policies for container runtimes @@ -103,8 +103,18 @@ fi # Currently shipped in selinux-policy-doc #%%{_datadir}/man/man8/container_selinux.8.gz +%triggerpostun -- container-selinux < 2:2.162.1-3 +if %{_sbindir}/selinuxenabled ; then + echo "Fixing Rootless SELinux labels in homedir" + %{_sbindir}/restorecon -R /home/*/.local/share/containers/storage/overlay* 2> /dev/null +fi + + # Hooked up to autobuilder, please check with @lsm5 before updating %changelog +* Mon May 17 2021 Dan Walsh - 2:2.162.1-3.dev.git233e620 +- Fix labels in users homedirs, before overlayfs is supported by default for non root users + * Sun May 16 2021 RH Container Bot - 2:2.162.1-2.dev.git233e620 - bump to 2.162.1 - autobuilt 233e620