Re: [xfstests-bld PATCH] setup-buildchroot: fix copying passwd and group entries

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Thu, Aug 31, 2017 at 01:14:50PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> create_chroot() is now supposed to add $CHROOT_USER to /etc/passwd in
> the chroot.  However, due to a bad grep pattern, it would add multiple
> entries if $CHROOT_USER happened to be a suffix of another username.
> Also the passwd record is not guaranteed to actually be in the file
> /etc/passwd.  Fix it by using 'getent passwd $CHROOT_USER' instead.
> 
> A similar problem existed for the group entry, but also the
> $CHROOT_USER's primary group is not guaranteed to have the same name as
> the user.  Fix that by using 'id -g' to look up the primary group.
> 

Ted, can you apply this patch?  Thanks!

Eric
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux