[Libguestfs] [PATCH 3/4] Call febootstrap-supermin-helper using the new -u and -g options

Matthew Booth mbooth at redhat.com
Thu Oct 28 14:19:13 UTC 2010


Use febootstrap-supermin-helper's new -u and -g command line options to setuid,
rather than doing it in libguestfs.

This resolves an issue with the generation of the cached appliance checksum. The
checksum was being generated by a call to febootstrap-supermin-helper through
popen(). Unfortunately, a bash misfeature meant that euid would be reset to uid,
and the checksum was generated for uid, not euid. When virt-v2v is writing to a
RHEV target, uid == 0 and euid == 36, which resulted in a cached appliance being
created for root with permissions for uid 36.
---
 src/appliance.c |   51 +++++++++++++++++++++------------------------------
 1 files changed, 21 insertions(+), 30 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Call-febootstrap-supermin-helper-using-the-new-u-and.patch
Type: text/x-patch
Size: 3034 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101028/b9adb5dc/attachment.bin>


More information about the Libguestfs mailing list