[libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

Cole Robinson crobinso at redhat.com
Tue Dec 17 19:49:36 UTC 2019


On 12/17/19 11:41 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
>  src/util/virutil.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/util/virutil.c b/src/util/virutil.c
> index ed1f696e37..8c255abd7f 100644
> --- a/src/util/virutil.c
> +++ b/src/util/virutil.c
> @@ -582,7 +582,7 @@ virGetHostnameQuiet(void)
>  char *
>  virGetUserDirectory(void)
>  {
> -    return virGetUserDirectoryByUID(geteuid());
> +    return g_strdup_printf("%s/libvirt", g_get_home_dir());
>  }

This is supposed to be returning $HOME, not $HOME/libvirt. IMO leave
this one as it is, since it's tied into the larger getent handling

- Cole




More information about the libvir-list mailing list