[Spice-devel] [PATCH spice-gtk] option: check that default ca-file exists

Christophe Fergeau cfergeau at redhat.com
Thu Apr 24 07:06:46 PDT 2014



----- Mail original -----
> Don't set default ca-file path if the file doesn't exists.
> ---
>  gtk/spice-option.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/gtk/spice-option.c b/gtk/spice-option.c
> index 2d03912..0a0f9ef 100644
> --- a/gtk/spice-option.c
> +++ b/gtk/spice-option.c
> @@ -226,6 +226,8 @@ void spice_set_session_option(SpiceSession *session)
>          if (!homedir)
>              homedir = g_get_home_dir();
>          ca_file = g_build_filename(homedir, ".spicec",
>          "spice_truststore.pem", NULL);
> +        if (!g_file_test(ca_file, G_FILE_TEST_IS_REGULAR))
> +            g_clear_pointer(&ca_file, g_free);
>      }
>  

ACK.

Christophe


More information about the Spice-devel mailing list