daemon: Fix for commands working on absolute symbolic links (RHBZ#579608).
authorRichard Jones <rjones@redhat.com>
Thu, 6 May 2010 20:36:24 +0000 (21:36 +0100)
committerRichard Jones <rjones@redhat.com>
Fri, 7 May 2010 14:27:28 +0000 (15:27 +0100)
The original idea (suggested by Al Viro) was to fork and chroot
into the sysroot and read the file from there.  Because of the
separate process being chrooted, absolute links would be resolved
correctly.  The slightly modified idea is to open the file in the
daemon process (but temporarily chrooted, so symlinks resolve
correctly), fork, and have the subprocess just be responsible for
copying the file.  (Strictly speaking we don't need to fork, but
this implementation is simpler).

This commit just includes the changes needed to the command*()
functions in daemon/guestfsd.c and adds an absolute symlink to
the test ISO for testing it.  Later commits will fix the broken
daemon commands themselves.


No differences found