1. 24 7月, 2011 3 次提交
    • J
      notifier: Pass data argument to callback · 9e8dd451
      Jan Kiszka 提交于
      This allows to pass additional information to the notifier callback
      which is useful if sender and receiver do not share any other distinct
      data structure.
      
      Will be used first for the clock reset notifier.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      9e8dd451
    • D
      Introduce a 'client_add' monitor command accepting an open FD · 13661089
      Daniel P. Berrange 提交于
      Allow client connections for VNC and socket based character
      devices to be passed in over the monitor using SCM_RIGHTS.
      
      One intended usage scenario is to start QEMU with VNC on a
      UNIX domain socket. An unprivileged user which cannot access
      the UNIX domain socket, can then connect to QEMU's VNC server
      by passing an open FD to libvirt, which passes it onto QEMU.
      
       { "execute": "get_fd", "arguments": { "fdname": "myclient" } }
       { "return": {} }
       { "execute": "add_client", "arguments": { "protocol": "vnc",
                                                 "fdname": "myclient",
                                                 "skipauth": true } }
       { "return": {} }
      
      In this case 'protocol' can be 'vnc' or 'spice', or the name
      of a character device (eg from -chardev id=XXXX)
      
      The 'skipauth' parameter can be used to skip any configured
      VNC authentication scheme, which is useful if the mgmt layer
      talking to the monitor has already authenticated the client
      in another way.
      
      * console.h: Define 'vnc_display_add_client' method
      * monitor.c: Implement 'client_add' command
      * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method
      * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED
      * qmp-commands.hx: Declare 'client_add' command
      * ui/vnc.c: Implement 'vnc_display_add_client' method
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      13661089
    • D
      Store VNC auth scheme per-client as well as per-server · 7e7e2ebc
      Daniel P. Berrange 提交于
      A future patch will introduce a situation where different
      clients may have different authentication schemes set.
      When a new client arrives, copy the 'auth' and 'subauth'
      fields from VncDisplay into the client's VncState, and
      use the latter in all authentication functions.
      
      * ui/vnc.h: Add 'auth' and 'subauth' to VncState
      * ui/vnc-auth-sasl.c, ui/vnc-auth-vencrypt.c,
        ui/vnc.c: Make auth functions pull auth scheme
        from VncState instead of VncDisplay
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7e7e2ebc
  2. 23 3月, 2011 1 次提交
  3. 22 3月, 2011 2 次提交
  4. 21 3月, 2011 1 次提交
    • P
      change all rt_clock references to use millisecond resolution accessors · 7bd427d8
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
              $(git grep -l 'get_clock\>.*rt_clock' )
          sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \
              $(git grep -l 'new_timer\>.*rt_clock' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7bd427d8
  5. 16 3月, 2011 1 次提交
  6. 11 3月, 2011 1 次提交
    • S
      vnc: Fix stack corruption and other bitmap related bugs · 23bfe28f
      Stefan Weil 提交于
      Commit bc2429b9 introduced
      a severe bug (stack corruption).
      
      bitmap_clear was called with a wrong argument
      which caused out-of-bound writes to the local variable width_mask.
      
      This bug was detected with QEMU running on windows.
      It also occurs with wine:
      
      *** stack smashing detected ***:  terminated
      wine: Unhandled illegal instruction at address 0x6115c7 (thread 0009), starting debugger...
      
      The bug is not windows specific!
      
      Instead of fixing the wrong parameter value, bitmap_clear(), bitmap_set
      and width_mask were removed, and bitmap_intersect() was replaced by
      !bitmap_empty(). The new operation is much shorter and equivalent to
      the old operations.
      
      The declarations of the dirty bitmaps in vnc.h were also wrong for 64 bit
      hosts because of a rounding effect: for these hosts, VNC_MAX_WIDTH is no
      longer a multiple of (16 * BITS_PER_LONG), so the rounded value of
      VNC_DIRTY_WORDS was too small.
      
      Fix both declarations by using the macro which is designed for this
      purpose.
      
      Cc: Corentin Chary <corentincj@iksaif.net>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Gerhard Wiesinger <lists@wiesinger.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      23bfe28f
  7. 24 2月, 2011 9 次提交
  8. 02 2月, 2011 1 次提交
    • A
      vnc: Fix password expiration through 'change vnc ""' (v2) · 1cd20f8b
      Anthony Liguori 提交于
      commit 52c18be9 introduced a regression in the
      change vnc password command that changed the behavior of setting the VNC
      password to an empty string from disabling login to disabling authentication.
      
      This commit refactors the code to eliminate this overloaded semantics in
      vnc_display_password and instead introduces the vnc_display_disable_login.   The
      monitor implementation then determines the behavior of an empty or missing
      string.
      
      Recently, a set_password command was added that allows both the Spice and VNC
      password to be set.  This command has not shown up in a release yet so the
      behavior is not yet defined.
      
      This patch proposes that an empty password be treated as an empty password with
      no special handling.  For specifically disabling login, I believe a new command
      should be introduced instead of overloading semantics.
      
      I'm not sure how Spice handles this but I would recommend that we have Spice
      and VNC have consistent semantics here for the 0.14.0 release.
      Reported-by: NNeil Wilson <neil@aldur.co.uk>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ---
      v1 -> v2
       - Add a proper return to make sure that login is really disabled instead of
         relying on the VNC server to treat empty passwords specially
      1cd20f8b
  9. 25 1月, 2011 1 次提交
    • G
      vnc: fix numlock+capslock tracking · 9892088b
      Gerd Hoffmann 提交于
      This patch makes the numlock+capslock tracking logic only look at
      keydown events.  Without this patch the vnc server will insert
      bogous capslock keypress in case it sees the following key sequence:
      
        shift down --- 'A' down --- shift up  --- 'A' up
                                               ^ here
      
      It doesn't hurt with a PS/2 keyboard, but it disturbs the USB Keyboard.
      And with the key event queue just added to the usb keyboard the guest
      will actually notice.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9892088b
  10. 09 12月, 2010 2 次提交
  11. 14 10月, 2010 1 次提交
    • B
      vnc: avoid write only variables · 2ded6ad7
      Blue Swirl 提交于
      Compiling with GCC 4.6.0 20100925 produced warnings:
      /src/qemu/ui/vnc.c: In function 'vnc_client_cache_auth':
      /src/qemu/ui/vnc.c:217:12: error: variable 'qdict' set but not used [-Werror=unused-but-set-variable]
      /src/qemu/ui/vnc.c: In function 'vnc_display_open':
      /src/qemu/ui/vnc.c:2526:9: error: variable 'acl' set but not used [-Werror=unused-but-set-variable]
      
      Fix by making the variable declarations and their uses also conditional
      to debug definition.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2ded6ad7
  12. 23 8月, 2010 1 次提交
  13. 27 7月, 2010 7 次提交
  14. 02 6月, 2010 9 次提交