Use environment setfiles
Hard coded path fails on Distros (such as el6) with setfiles bin in different places, for example, rhel6 has this in /sbin/setfiles Change-Id: I7aff9cdadd9aed9cfc806a1010acbf36b7b6d0e7
This commit is contained in:
parent
07da09b4f4
commit
7514fc066f
1 changed files with 2 additions and 2 deletions
|
@ -5,8 +5,8 @@ if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
||||||
fi
|
fi
|
||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
SETFILES=$(which setfiles)
|
||||||
if [ -e /etc/selinux/targeted/contexts/files/file_contexts -a -x /usr/sbin/setfiles ]; then
|
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
|
# Without fixing selinux file labels, sshd will run in the kernel_t domain
|
||||||
# instead of the sshd_t domain, making ssh connections fail with
|
# instead of the sshd_t domain, making ssh connections fail with
|
||||||
# "Unable to get valid context for <user>" error message
|
# "Unable to get valid context for <user>" error message
|
||||||
|
|
Loading…
Reference in a new issue