Fix restorecon to not error on missing directory
This commit is contained in:
parent
1c6b7ec5b2
commit
5c39536b9a
@ -27,7 +27,7 @@ Name: container-selinux
|
|||||||
Epoch: 2
|
Epoch: 2
|
||||||
%endif
|
%endif
|
||||||
Version: 2.71
|
Version: 2.71
|
||||||
Release: 1.git%{shortcommit0}%{?dist}
|
Release: 2.git%{shortcommit0}%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: %{git0}
|
URL: %{git0}
|
||||||
Summary: SELinux policies for container runtimes
|
Summary: SELinux policies for container runtimes
|
||||||
@ -86,10 +86,12 @@ if %{_sbindir}/selinuxenabled ; then
|
|||||||
%relabel_files
|
%relabel_files
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
restorecon -R %{_sharedstatedir}/docker &> /dev/null || :
|
restorecon -R %{_sharedstatedir}/docker &> /dev/null || :
|
||||||
|
restorecon -R %{_sharedstatedir}/containers &> /dev/null || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
. %{_sysconfdir}/selinux/config
|
. %{_sysconfdir}/selinux/config
|
||||||
sed -e "\|container_file_t|h; \${x;s|container_file_t||;{g;t};a\\" -e "container_file_t" -e "}" -i /etc/selinux/${SELINUXTYPE}/contexts/customizable_types
|
sed -e "\|container_file_t|h; \${x;s|container_file_t||;{g;t};a\\" -e "container_file_t" -e "}" -i /etc/selinux/${SELINUXTYPE}/contexts/customizable_types
|
||||||
|
matchpathcon -qV %{_sharedstatedir}/containers || restorecon -R %{_sharedstatedir}/containers &> /dev/null || :
|
||||||
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
@ -109,6 +111,9 @@ fi
|
|||||||
%{_datadir}/selinux/*
|
%{_datadir}/selinux/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 27 2018 Dan Walsh <dwalsh@fedoraproject.org> - 2.71-2
|
||||||
|
- Fix restorecon to not error on missing directory
|
||||||
|
|
||||||
* Wed Aug 22 2018 Dan Walsh <dwalsh@fedoraproject.org> - 2.71-1
|
* Wed Aug 22 2018 Dan Walsh <dwalsh@fedoraproject.org> - 2.71-1
|
||||||
- Allow unconfined_r to transition to system_r over container_runtime_exec_t
|
- Allow unconfined_r to transition to system_r over container_runtime_exec_t
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user