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

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:11:26 UTC 2015


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

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

commit ddb7f72d21816b943034f5438222ca18ab7b9ae7
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.
    
    (cherry picked from commit 34439a04f1921c4e5ece1077570b0f036a64c7ee)
---
 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