Re: [PATCH 3/3] libvirt-admin: do not crash on URI without a scheme

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/16 10:51, Ján Tomko wrote:
> ---
>  src/libvirt-admin.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c
> index 54af90c..6577c87 100644
> --- a/src/libvirt-admin.c
> +++ b/src/libvirt-admin.c
> @@ -121,10 +121,10 @@ getSocketPath(virURIPtr uri)
>      }
>  
>      if (!sock_path) {
> -        if (STRNEQ(uri->scheme, "libvirtd")) {
> +        if (STRNEQ_NULLABLE(uri->scheme, "libvirtd")) {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                             _("Unsupported URI scheme '%s'"),
> -                           uri->scheme);
> +                           NULLSTR(uri->scheme));
>              goto error;
>          }
>          if (STREQ_NULLABLE(uri->path, "/system")) {
> 

ACK, we should also check the URI form if user provided socket path as
well, I added that one on my TODO list.

Erik

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]