[Libvirt-cim] [PATCH 1 of 2] Add Password attribute to GraphicsRASD

Richard Maciel rmaciel at linux.vnet.ibm.com
Fri Jul 10 20:28:29 UTC 2009


I think you should at least print the Password property as an empty 
property (or even with asterisks) in the set_graphics_rasd_parameters().

It's kinda weird to print it on the template rasd, but not on the real 
rasd instance.

Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1247095850 25200
> # Node ID f609e31b0c17ea550f27426dd8e329c362f4db3e
> # Parent  0fb4613252c19abb6bf5496a8b7031793ba7f298
> Add Password attribute to GraphicsRASD
> 
> Also add necessary changes to the graphics struct and generating XML with the
> passwd attribute.
> 
> The passwd won't show up in the XML we get back from libvirt, so pulling the
> passwd from the guest XML isn't included in parse_graphics_device().
> 
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
> 
> diff -r 0fb4613252c1 -r f609e31b0c17 libxkutil/device_parsing.c
> --- a/libxkutil/device_parsing.c	Tue Jun 30 14:33:31 2009 -0700
> +++ b/libxkutil/device_parsing.c	Wed Jul 08 16:30:50 2009 -0700
> @@ -81,6 +81,7 @@
>          free(dev->port);
>          free(dev->host);
>          free(dev->keymap);
> +        free(dev->passwd);
>  }
> 
>  static void cleanup_input_device(struct input_device *dev)
> diff -r 0fb4613252c1 -r f609e31b0c17 libxkutil/device_parsing.h
> --- a/libxkutil/device_parsing.h	Tue Jun 30 14:33:31 2009 -0700
> +++ b/libxkutil/device_parsing.h	Wed Jul 08 16:30:50 2009 -0700
> @@ -70,6 +70,7 @@
>          char *port;
>          char *host;
>          char *keymap;
> +        char *passwd;
>  };
> 
>  struct input_device {
> diff -r 0fb4613252c1 -r f609e31b0c17 libxkutil/xmlgen.c
> --- a/libxkutil/xmlgen.c	Tue Jun 30 14:33:31 2009 -0700
> +++ b/libxkutil/xmlgen.c	Wed Jul 08 16:30:50 2009 -0700
> @@ -338,11 +338,21 @@
>                          return XML_ERROR;
> 
>                  xmlNewProp(tmp, BAD_CAST "type", BAD_CAST dev->type);
> +
> +                if (STREQC(dev->type, "sdl"))
> +                        goto out;
> +
>                  xmlNewProp(tmp, BAD_CAST "port", BAD_CAST dev->port);
>                  xmlNewProp(tmp, BAD_CAST "listen", BAD_CAST dev->host);
>                  xmlNewProp(tmp, BAD_CAST "keymap", BAD_CAST dev->keymap);
> +
> +                if (dev->passwd != NULL)
> +                        xmlNewProp(tmp, 
> +                                   BAD_CAST "passwd", 
> +                                   BAD_CAST dev->passwd);
>          }
> 
> + out:
>          return NULL;
>  }
> 
> diff -r 0fb4613252c1 -r f609e31b0c17 schema/ResourceAllocationSettingData.mof
> --- a/schema/ResourceAllocationSettingData.mof	Tue Jun 30 14:33:31 2009 -0700
> +++ b/schema/ResourceAllocationSettingData.mof	Wed Jul 08 16:30:50 2009 -0700
> @@ -132,6 +132,9 @@
>  {
>        [Description ("Keyboard keymapping")]
>        string KeyMap;
> +
> +      [Description ("VNC password")]
> +      string Password;
>  };
> 
>  [Description ("KVM virtual graphics device"),
> @@ -141,6 +144,9 @@
>  {
>        [Description ("Keyboard keymapping")]
>        string KeyMap;
> +
> +      [Description ("VNC password")]
> +      string Password;
>  };
> 
>  [Description ("LXC virtual graphics device"),
> @@ -150,6 +156,9 @@
>  {
>        [Description ("Keyboard keymapping")]
>        string KeyMap;
> +
> +      [Description ("VNC password")]
> +      string Password;
>  };
> 
>  [Description ("Xen virtual input device"),
> 
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim


-- 
Richard Maciel, MSc
IBM Linux Technology Center
rmaciel at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list