Matthew Booth
2010-Oct-28 14:19 UTC
[Libguestfs] [PATCH 1/4] New internal function guestfs___print_timestamped_argv
This function generalises the existing print_cmdline used to output the qemu command line to output any given command line, and exports it to other modules. It also adds a timestamp to the old print_cmdline output for consistency with guestfs___print_timestamped_message. --- src/guestfs-internal.h | 1 + src/launch.c | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 24 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-New-internal-function-guestfs___print_timestamped_ar.patch Type: text/x-patch Size: 3358 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101028/aae2a9a4/attachment.bin>
Matthew Booth
2010-Oct-28 14:19 UTC
[Libguestfs] [PATCH 2/4] Log the febootstrap-supermin-helper command line
A side-effect of change 17e7cb9937a63ed8f9bb0fb6ac7302758be76846 was the the febootstrap-supermin-helper was no longer logged. This change adds it back using the new guestfs___print_timestamped_argv internal function. --- src/appliance.c | 55 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 29 insertions(+), 26 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Log-the-febootstrap-supermin-helper-command-line.patch Type: text/x-patch Size: 2322 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101028/d9ec0294/attachment.bin>
Matthew Booth
2010-Oct-28 14:19 UTC
[Libguestfs] [PATCH 3/4] Call febootstrap-supermin-helper using the new -u and -g options
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>
Matthew Booth
2010-Oct-28 14:19 UTC
[Libguestfs] [PATCH 4/4] Ensure atomic creation of a cached appliance
Cached appliances are discovered by their predictable path. Previously we were creating a cached appliance directly in this predictable path. This had at least 2 undesirable effects: * Interrupting appliance creation would leave a corrupt appliance * 2 processes could simultaneously attempt to create the same appliance, causing corruption. This patch causes the cached appliance to be created in a temporary directory, and then renamed to the predictable path. As rename is an atomic operation, this makes the whole creation atomic. This patch also changes the predictable path to have a prefix of 'guestfs.'. This will make it simpler for system administrators to clean up old cached appliances. This patch resolves RHBZ#639405 --- po/POTFILES.in | 1 + regressions/test-launch-race.pl | 60 ++++++++++++++++++++++ src/appliance.c | 105 ++++++++++++++++++++++++++++++++++----- 3 files changed, 153 insertions(+), 13 deletions(-) create mode 100755 regressions/test-launch-race.pl -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-Ensure-atomic-creation-of-a-cached-appliance.patch Type: text/x-patch Size: 6975 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101028/6647d8aa/attachment.bin>
Reasonably Related Threads
- [PATCH 1/2] New internal function guestfs___print_timestamped_argv
- [PATCH] Fix error launching libguestfs when euid != uid
- Building PXE Bootable images using the libguestfs toolchain
- [PATCH 1/2] Add -u and -g options to febootstrap-supermin-helper
- [FEBOOTSTRAP] Ensure atomic creation of a cached appliance