Re: [PATCH] tools: make virt-pki-validate work with acls and xattrs

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

 



On 05/31/2012 03:02 AM, Martin Kletzander wrote:
> This patch makes virt-pki-validate work with certificates that have
> acl or xattr set. Otherwise it failing due to wrong permissions.
> ---
>  tools/virt-pki-validate.in |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/virt-pki-validate.in b/tools/virt-pki-validate.in
> index 01825d1..4164758 100755
> --- a/tools/virt-pki-validate.in
> +++ b/tools/virt-pki-validate.in
> @@ -170,7 +170,8 @@ then
>          else
>              echo Found client private key $LIBVIRTP/clientkey.pem
>              OWN=`ls -l "$LIBVIRTP/clientkey.pem" | awk '{ print $3 }'`
> -            MOD=`ls -l "$LIBVIRTP/clientkey.pem" | awk '{ print $1 }'`
> +            # The substr($1, 1, 10) gets rid of acl and xattr markers
> +            MOD=`ls -l "$LIBVIRTP/clientkey.pem" | awk '{ print substr($1, 1, 10) }'`

ACK.  There really isn't any better _portable_ alternative to getting a
file's permissions.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]