Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
src/util/virutil.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index ed1f696e37..70a05e3c9b 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -582,7 +582,13 @@ virGetHostnameQuiet(void)
char *
virGetUserDirectory(void)
{
- return virGetUserDirectoryByUID(geteuid());
+ const char *homedir;
+
+ homedir = g_get_home_dir();
+ if (!homedir)
+ return NULL;
+
+ return g_strdup_printf("%s/libvirt", homedir);
}
--
2.23.0