From a67407fa36623d44b0ebe8960e351f0b8a280d1e Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Fri, 20 May 2011 15:18:09 -0500 Subject: [PATCH] Use per-user TLS certificates when possible When using TLS authentication and operating as the non-root user, initially attempt to use that specific user's TLS certificates before attempting to use the system wide TLS certificates. Signed-off-by: Doug Goldstein --- .mailmap | 1 + AUTHORS | 2 +- src/remote/remote_driver.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index f73e26b9e3..62bc228054 100644 --- a/.mailmap +++ b/.mailmap @@ -19,3 +19,4 @@ + diff --git a/AUTHORS b/AUTHORS index a1e93db6bd..e8c9a10dd7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -81,7 +81,7 @@ Patches have also been contributed by: Serge E. Hallyn Soren Hansen Abel Míguez Rodríguez - Doug Goldstein + Doug Goldstein Javier Fontan Federico Simoncelli Amy Griffis diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 8c69743604..1691dab6ee 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1159,7 +1159,7 @@ initialize_gnutls(char *pkipath, int flags) if ((virAsprintf(&libvirt_clientcert, "%s/%s", pkipath, "clientcert.pem")) < 0) goto out_of_memory; - } else if (flags & VIR_DRV_OPEN_REMOTE_USER) { + } else if (flags & VIR_DRV_OPEN_REMOTE_USER || getuid() > 0) { userdir = virGetUserDirectory(getuid()); if (!userdir)