[PATCH] tools: fix paths in PKI validation error messages

Daniel P. Berrangé posted 1 patch 2 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20240612105454.1089115-1-berrange@redhat.com
tools/virt-pki-validate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] tools: fix paths in PKI validation error messages
Posted by Daniel P. Berrangé 2 months, 3 weeks ago
A couple of paths passed in the error messages, didnt match the paths
that were actually being tested.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tools/virt-pki-validate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virt-pki-validate.c b/tools/virt-pki-validate.c
index 656f29fdc5..e693ffaed6 100644
--- a/tools/virt-pki-validate.c
+++ b/tools/virt-pki-validate.c
@@ -184,7 +184,7 @@ virPKIValidateIdentity(bool isServer, bool system, const char *path)
                             _("Checking system cert dir access"),
                             0, 0, 0755,
                             _("The system cert dir %1$s must be accessible to all users. As root, run: chown root.root; chmod 0755 %2$s"),
-                            LIBVIRT_PKI_DIR, LIBVIRT_PKI_DIR);
+                            LIBVIRT_CERT_DIR, LIBVIRT_CERT_DIR);
 
         FILE_REQUIRE_EXISTS(scope,
                             LIBVIRT_KEY_DIR,
@@ -197,7 +197,7 @@ virPKIValidateIdentity(bool isServer, bool system, const char *path)
                             _("Checking system key dir access"),
                             0, 0, 0755,
                             _("The system key dir %1$s must be accessible to all users. As root, run: chown root.root; chmod 0755 %2$s"),
-                            LIBVIRT_KEY_DIR, LIBVIRT_PKI_DIR);
+                            LIBVIRT_KEY_DIR, LIBVIRT_KEY_DIR);
     } else if (path) {
         virNetTLSConfigCustomTrust(path,
                                    &cacert,
-- 
2.45.1
Re: [PATCH] tools: fix paths in PKI validation error messages
Posted by Pavel Hrdina 2 months, 3 weeks ago
On Wed, Jun 12, 2024 at 11:54:54AM +0100, Daniel P. Berrangé wrote:
> A couple of paths passed in the error messages, didnt match the paths
> that were actually being tested.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  tools/virt-pki-validate.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>