[Libguestfs] [PATCH 1/2] Add -u and -g options to febootstrap-supermin-helper

Matthew Booth mbooth at redhat.com
Fri Oct 1 15:50:32 UTC 2010


Bash automatically resets euid to uid when it executes. This can mean that the
effective user id of a program at the point it calls febootstrap-supermin-helper
can be lost if any part of execution chain involved bash. This in turn can
result in:

* the generation of an incorrect checksum, which contains the uid.
* the generation of supermin files with differing owners

The -u and -g options allow the caller to pass in an explicit user and group to
run as. These will be used when generating a checksum. Additionally,
febootstrap-supermin-helper will set(u|g)id as appropriate if they are given for
non-checksum output. This ensures all generated files will have the correct
ownership, regardless of how they are created.
---
 helper/checksum.c |    2 +-
 helper/helper.h   |    2 +
 helper/main.c     |  145 ++++++++++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 130 insertions(+), 19 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-u-and-g-options-to-febootstrap-supermin-helper.patch
Type: text/x-patch
Size: 6426 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101001/f90fd042/attachment.bin>


More information about the Libguestfs mailing list