summaryrefslogtreecommitdiffstats
path: root/run.in
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-09-26 21:03:37 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-09-26 21:03:37 +0100
commit91617069b9903af303187acaf8e83bc7dece2c93 (patch)
treeddb2a7d15b7769e58499efebbb7c850f3aba41f8 /run.in
parentf7e138835a7194135113088767c46df65dbf292a (diff)
downloadlibguestfs-91617069b9903af303187acaf8e83bc7dece2c93.tar.gz
libguestfs-91617069b9903af303187acaf8e83bc7dece2c93.tar.xz
libguestfs-91617069b9903af303187acaf8e83bc7dece2c93.zip
run: Label tmp directory.
There's not really any point just documenting that people should label the tmp directory, when we can just label it. So change the ./run script so it calls chcon. However it's not a failure if chcon doesn't work. If SELinux is not installed or is disabled, then labelling will fail.
Diffstat (limited to 'run.in')
-rwxr-xr-xrun.in3
1 files changed, 1 insertions, 2 deletions
diff --git a/run.in b/run.in
index cdcfa291..294beb2a 100755
--- a/run.in
+++ b/run.in
@@ -48,10 +48,9 @@ b=@abs_builddir@
#
# We set it to a subdirectory ('tmp') so that we can label this
# subdirectory to make libvirt + sVirt + SELinux enforcing work.
-#
-# chcon --reference=/tmp tmp
export TMPDIR="$b/tmp"
mkdir -p "$b/tmp"
+chcon --reference=/tmp tmp 2>/dev/null ||:
# Set local environment relative to this script.
export LIBGUESTFS_PATH="$b/appliance"