From fe559242cb8097bb4fbae9ba9111f3d88de07605 Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Thu, 11 Jun 2015 01:47:07 +0000 Subject: [PATCH] Dont fail if were missing setfiles We are using which to find the location of setfiles. Our script is set -e though, and we need to also be able to handle the case where setfiles does not exist (like on centos-minimal). Change-Id: If53c7a80efc081b95b143c28be64d39b12bfb469 --- elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore b/elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore index a82525a6e..84ff7e582 100755 --- a/elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore +++ b/elements/rpm-distro/finalise.d/11-selinux-fixfiles-restore @@ -5,7 +5,7 @@ if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then fi set -eu set -o pipefail -SETFILES=$(which setfiles) +SETFILES=$(which setfiles || true) if [ -e /etc/selinux/targeted/contexts/files/file_contexts -a -x "${SETFILES}" ]; then # Without fixing selinux file labels, sshd will run in the kernel_t domain # instead of the sshd_t domain, making ssh connections fail with