1. 07 3月, 2009 5 次提交
    • A
      Move TLS auth into separate file ("Daniel P. Berrange") · 5fb6c7a8
      aliguori 提交于
      This patch refactors the existing TLS code to make the main VNC code
      more managable. The code moves to two new files
      
       - vnc-tls.c: generic helpers for TLS handshake & credential setup
       - vnc-auth-vencrypt.c: the actual VNC TLS authentication mechanism.
      
      The reason for this split is that there are other TLS based auth
      mechanisms which we may like to use in the future. These can all
      share the same vnc-tls.c routines. In addition this will facilitate
      anyone who may want to port the vnc-tls.c file to allow for choice
      of GNUTLS & NSS for impl.
      
      The TLS state is moved out of the VncState struct, and into a separate
      VncStateTLS struct, defined in vnc-tls.h. This is then referenced from
      the main VncState. End size of the struct is the same, but it keeps
      things a little more managable.
      
      The vnc.h file gains a bunch more function prototypes, for functions
      in vnc.c that were previously static, but now need to be accessed
      from the separate auth code files.
      
      The only TLS related code still in the main vl.c is the command line
      argument handling / setup, and the low level I/O routines calling
      gnutls_send/recv.
      
      
       Makefile              |   11 
       b/vnc-auth-vencrypt.c |  167 ++++++++++++++
       b/vnc-auth-vencrypt.h |   33 ++
       b/vnc-tls.c           |  414 +++++++++++++++++++++++++++++++++++
       b/vnc-tls.h           |   70 ++++++
       vnc.c                 |  581 +++-----------------------------------------------
       vnc.h                 |   76 ++++--
       7 files changed, 780 insertions(+), 572 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6723 c046a42c-6fe2-441c-8c8c-71466251a162
      5fb6c7a8
    • A
      Move VNC structs into header file ("Daniel P. Berrange") · 19a490bf
      aliguori 提交于
      This patch moves the definitions of VncState and VncDisplay structs
      out into a vnc.h header file. This is to allow the code for TLS
      and SASL auth mechanisms to be moved out of the main vnc.c file.
      
      
       vnc.c |  109 ------------------------------------------------
       vnc.h |  149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
       2 files changed, 148 insertions(+), 110 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6722 c046a42c-6fe2-441c-8c8c-71466251a162
      19a490bf
    • A
      Refactor keymap code to avoid duplication ("Daniel P. Berrange") · 0483755a
      aliguori 提交于
      Each of the graphical frontends #include a .c file, for keymap code
      resulting in duplicated definitions & duplicated compiled code. A
      couple of small changes allowed this to be sanitized, so instead of
      doing a #include "keymaps.c", duplicating all code, we can have a
      shared keymaps.h file, and only compile code once. This allows the
      next patch to move the VncState struct out into a header file without
      causing clashing definitions.
      
      
       Makefile      |    9 +++++---
       b/keymaps.h   |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       curses.c      |    3 --
       curses_keys.h |    9 +++-----
       keymaps.c     |   45 ++++++++++++++++---------------------------
       sdl.c         |    3 --
       sdl_keysym.h  |    7 ++----
       vnc.c         |    5 +---
       vnc_keysym.h  |    7 ++----
       9 files changed, 97 insertions(+), 51 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6721 c046a42c-6fe2-441c-8c8c-71466251a162
      0483755a
    • A
      Enhance 'info vnc' monitor output ("Daniel P. Berrange") · 1ff7df1a
      aliguori 提交于
      The current 'info vnc' monitor output just displays the VNC server address
      as provided by the -vnc command line flag. This isn't particularly useful
      since it doesn't tell you what VNC is actually listening on. eg, if you
      use '-vnc :1' it is useful to know whether this translated to '0.0.0.0:5901'
      or chose IPv6 ':::5901'.  It is also useful to know the address of the
      client that is currently connected. It is also useful to know the active
      authentication (if any).
      
      This patch tweaks the monitor output to look like:
      
         (qemu) info vnc
          Server:
               address: 0.0.0.0:5902
                  auth: vencrypt+x509
          Client: none
      
      And when 2 clients are connected
      
         (qemu) info vnc
          Server:
               address: 0.0.0.0:5902
                  auth: vencrypt+x509
          Client:
               address: 10.33.6.67:38621
          Client:
               address: 10.33.6.63:38620
      
      More data will be added to this later in the patch series...
      
      The 'addr_to_string' helper method in this patch is overly generic
      for the needs of this patch alone. This is because it will be re-used
      by the later SASL patches in this series, where the flexibility is
      important.
      
      
       vnc.c |  137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
       1 file changed, 127 insertions(+), 10 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6720 c046a42c-6fe2-441c-8c8c-71466251a162
      1ff7df1a
    • A
      Fix bug in TLS authentication ("Daniel P. Berrange") · adc5ec85
      aliguori 提交于
      This patch was previously posted here:
      
        http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00820.html
      
      In the case where the TLS handshake does *not* block on I/O, QEMU
      sends the next 'start sub-auth' message twice. This seriously confuses
      the VNC client :-) Fortunately the chances of the handshake not blocking
      are close to zero for a TCP socket, which is why it has not been noticed
      thus far. Even with both client & server on localhost, I can only hit the
      bug 1 time in 20.
      
      NB, the diff context here is not too informative. If you look at the
      full code you'll see that a few lines early we called vnc_start_tls()
      which called vnc_continue_handshake() which called the method
      start_auth_vencrypt_subauth(). Hence, fixing the bug, just involves
      removing the 2nd bogus call to start_auth_vencrypt_subauth() as per
      this patch.
      
      
       vnc.c |    8 --------
       1 file changed, 8 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6719 c046a42c-6fe2-441c-8c8c-71466251a162
      adc5ec85
  2. 06 3月, 2009 21 次提交
  3. 05 3月, 2009 3 次提交
    • A
      Add version information for 0.10.0 release. · b4171e4b
      aliguori 提交于
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6685 c046a42c-6fe2-441c-8c8c-71466251a162
      b4171e4b
    • B
      Fix "info registers" under kvm. · ff3c01ca
      balrog 提交于
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6684 c046a42c-6fe2-441c-8c8c-71466251a162
      ff3c01ca
    • A
      Update cocoa.m to match new DisplayState code (Samuel Benson) · 9794f74f
      aliguori 提交于
      Version 2 does as follows:
      
      [1]: Corrects endianness on issues by using native BGR to RGB conversion
      [2]: Uses DisplayState accessors for obtaining graphics context information,
           which
      [3]: Removes now unused variables, and
      [4]: Allows reading of varying color modes (32bit/24/16), and converting to
           native colorspace
      [5]: Attempts to keep itself centered on screen (as opposed to bottom right,
           which immediately goes off screen after bios load) on context changes
          (window resizes)
      
      Testing working on i386 (gentoo, Windows 2000) and PPC (debian) guests on PPC
      and x86 Macs.
      
      In regards to [4], Windows 2000 displays fine on quick tests, but on the lowest
      setting I could test, 16bit color depth at 4bpp, colors are slightly off. I
      used gentoo install-x86-minimal-2008.0 in framebuffer mode to test above
      setting; the usual grey text is now blue, and Tux appears to be BGR shifted. I
      do not know if previous code worked at such a low color setting.
      
      Signed-off-by: Samuel Benson <qemu_ml@digitalescape.info> 
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6683 c046a42c-6fe2-441c-8c8c-71466251a162
      9794f74f
  4. 04 3月, 2009 6 次提交
  5. 03 3月, 2009 5 次提交