]> xenbits.xensource.com Git - libvirt.git/commit
Fix LXC startup when /var/run is an absolute symlink
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 15 May 2013 09:49:20 +0000 (10:49 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 16 May 2013 15:28:53 +0000 (16:28 +0100)
commitd7d7581b034d5fe9841a13ea04034c43802ec773
treed3af5f271c61f4523bca2d9b1f444ffa555051e4
parente3b40bec426273028c218f3bef147d424ad7759a
Fix LXC startup when /var/run is an absolute symlink

During startup, the LXC driver uses paths such as

  /.oldroot/var/run/libvirt/lxc/...

to access directories from the previous root filesystem
after doing a pivot_root(). Unfortunately if /var/run
is an absolute symlink to /run, instead of a relative
symlink to ../run, these paths break.

At least one Linux distro is known to use an absolute
symlink for /var/run, so workaround this, by resolving
all symlinks before doing the pivot_root().

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_container.c