1. 10 2月, 2012 3 次提交
    • G
      vnc: implement shared flag handling. · 8cf36489
      Gerd Hoffmann 提交于
      VNC clients send a shared flag in the client init message.  Up to now
      qemu completely ignores this.  This patch implements shared flag
      handling.  It comes with three policies:  By default qemu behaves as one
      would expect:  Asking for a exclusive access grants exclusive access to
      the client connecting.  There is also a desktop sharing mode which
      disallows exclusive connects (so one forgetting -shared wouldn't drop
      everybody else) and a compatibility mode which mimics the traditional
      (but non-conforming) qemu behavior.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8cf36489
    • G
      vnc: fix ctrl key in vnc terminal emulation · e26437c2
      Gerd Hoffmann 提交于
      Make the control keys for terminals on the vnc display
      (i.e. qemu -vnc :0 -serial vc) work.  Makes the terminals
      alot more usable as typing Ctrl-C in your serial console
      actually has the desired effect ;)
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e26437c2
    • G
      Fix vnc memory corruption with width = 1400 · ce3e1417
      Gerd Hoffmann 提交于
      vnc assumes that the screen width is a multiple of 16 in several places.
      If this is not the case vnc will overrun buffers, corrupt memory, make
      qemu crash.
      
      This is the minimum fix for this bug. It makes sure we don't overrun the
      scanline, thereby fixing the segfault.  The rendering is *not* correct
      though, there is a black border at the right side of the screen, 8
      pixels wide because 1400 % 16 == 8.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      ce3e1417
  2. 18 1月, 2012 1 次提交
  3. 13 1月, 2012 1 次提交
  4. 06 12月, 2011 1 次提交
  5. 02 12月, 2011 1 次提交
  6. 02 11月, 2011 1 次提交
  7. 27 10月, 2011 1 次提交
    • L
      qapi: Convert query-vnc · 2b54aa87
      Luiz Capitulino 提交于
      There are three important remarks in relation to the non-qapi command:
      
       1. This commit also fixes the behavior of the 'query-vnc' and 'info vnc'
          commands to return an error when qemu is built without VNC support
          (ie. --disable-vnc). The non-qapi command would return the OK
          response in QMP and no response in HMP
      
       2. The qapi version explicitly marks the fields 'host', 'family',
          'service' and 'auth' as optional. Their are not documented as optional
          in the non-qapi command doc, but they would not be returned if
          vnc support is disabled. The qapi version maintains the same
          semantics, but documents those fields correctly
      
       3. The 'clients' field, which is a list, is marked as optional but is
          always returned. If there are no clients connected an empty list
          is returned. This is not the Right Way to this in the qapi but it's
          how the non-qapi command used to work
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      2b54aa87
  8. 21 8月, 2011 1 次提交
  9. 25 7月, 2011 1 次提交
    • B
      Wrap recv to avoid warnings · 00aa0040
      Blue Swirl 提交于
      Avoid warnings like these by wrapping recv():
        CC    slirp/ip_icmp.o
      /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
      /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]
      /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *'
      
      Remove also casts used to avoid warnings.
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      00aa0040
  10. 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
  11. 23 3月, 2011 1 次提交
  12. 22 3月, 2011 2 次提交
  13. 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
  14. 16 3月, 2011 1 次提交
  15. 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
  16. 24 2月, 2011 9 次提交
  17. 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
  18. 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
  19. 09 12月, 2010 2 次提交
  20. 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
  21. 23 8月, 2010 1 次提交
  22. 27 7月, 2010 5 次提交