diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-09-20 14:02:06 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-09-20 15:04:57 +0100 |
commit | 17e7cb9937a63ed8f9bb0fb6ac7302758be76846 (patch) | |
tree | 3faf8894b823a11b667ee192a67ba525aa45aa33 /src/guestfs-internal.h | |
parent | 6123abc165e707a19e35b5cf16e676f79476116c (diff) | |
download | libguestfs-17e7cb9937a63ed8f9bb0fb6ac7302758be76846.tar.gz libguestfs-17e7cb9937a63ed8f9bb0fb6ac7302758be76846.tar.xz libguestfs-17e7cb9937a63ed8f9bb0fb6ac7302758be76846.zip |
Fix error launching libguestfs when euid != uid.
When writing to a RHEV target, virt-v2v launches the libguestfs
appliance with euid:egid = 36:36, which is required to write to
an NFS target using root_squash.
Since we changed to using a cached appliance, this causes an error on
start up, as the cached files are owned by root, but the cache directory
is owned by 36:36. The reason is that bash resets euid to uid and
egid to gid so when febootstrap-supermin-helper is executed, it runs as
root:root. The cache directory was created by libguestfs directly so
it has the correct ownership.
This patch fixes the issue by using explicit fork/exec instead of
system (ie. not going via a shell) and by setting the real UID and
GID to the effective UID and GID before execing.
Diffstat (limited to 'src/guestfs-internal.h')
0 files changed, 0 insertions, 0 deletions