mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
tools: make virt-pki-validate work with acls and xattrs
This patch makes virt-pki-validate work with certificates that have acl or xattr set. Otherwise it failing due to wrong permissions.
This commit is contained in:
parent
b19c236d69
commit
d4fb6694a4
@ -170,7 +170,8 @@ then
|
|||||||
else
|
else
|
||||||
echo Found client private key $LIBVIRTP/clientkey.pem
|
echo Found client private key $LIBVIRTP/clientkey.pem
|
||||||
OWN=`ls -l "$LIBVIRTP/clientkey.pem" | awk '{ print $3 }'`
|
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) }'`
|
||||||
if [ "$OWN" != "root" ]
|
if [ "$OWN" != "root" ]
|
||||||
then
|
then
|
||||||
echo The client private key should be owned by root
|
echo The client private key should be owned by root
|
||||||
@ -222,7 +223,8 @@ then
|
|||||||
else
|
else
|
||||||
echo Found server private key $LIBVIRTP/serverkey.pem
|
echo Found server private key $LIBVIRTP/serverkey.pem
|
||||||
OWN=`ls -l "$LIBVIRTP/serverkey.pem" | awk '{ print $3 }'`
|
OWN=`ls -l "$LIBVIRTP/serverkey.pem" | awk '{ print $3 }'`
|
||||||
MOD=`ls -l "$LIBVIRTP/serverkey.pem" | awk '{ print $1 }'`
|
# The substr($1, 1, 10) gets rid of acl and xattr markers
|
||||||
|
MOD=`ls -l "$LIBVIRTP/serverkey.pem" | awk '{ print substr($1, 1, 10) }'`
|
||||||
if [ "$OWN" != "root" ]
|
if [ "$OWN" != "root" ]
|
||||||
then
|
then
|
||||||
echo The server private key should be owned by root
|
echo The server private key should be owned by root
|
||||||
|
Loading…
x
Reference in New Issue
Block a user