[Pkg-libvirt-commits] [libguestfs] 23/31: appliance: Make sure /tmp and /var/tmp are real directories.

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:13:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.46
in repository libguestfs.

commit 34439a04f1921c4e5ece1077570b0f036a64c7ee
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Jun 3 18:56:31 2015 +0100

    appliance: Make sure /tmp and /var/tmp are real directories.
    
    Currently if /tmp (on the host) is a symlink, then the symlink is
    copied into the appliance, probably pointing to a non-existent
    directory, and everything goes downhill from there.
    
    Avoid this by making sure that /tmp and /var/tmp are real directories.
---
 appliance/init | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/appliance/init b/appliance/init
index 3c5ef1b..eb1b487 100755
--- a/appliance/init
+++ b/appliance/init
@@ -10,6 +10,13 @@ RUNLEVEL=S
 PREVLEVEL=N
 export RUNLEVEL PREVLEVEL
 
+# Make sure /tmp /var/tmp are real directories, not symlinks.
+if [ ! -d /tmp ] || [ ! -d /var/tmp ]; then
+    rm -f /tmp /var/tmp
+    mkdir /tmp /var/tmp
+    chmod 1777 /tmp /var/tmp
+fi
+
 # Make sure to find all the libraries, also those in non-standard place
 # but with a proper ld.so configuration pointing at them
 ldconfig

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list