History | View | Annotate | Download (76.2 kB)
Monitor: Drop QMP documentation from code
Previous commit added QMP documentation to the qemu-monitor.hxfile, it's is a copy of this information.
While it's good to keep it near code, maintaining two copies ofthe same information is too hard and has little benefit as we...
vnc: don't send invalid screen updates.
Don't send updates for screen areas which are outside the clientsdesktop. May happed with vnc clients which don't support the desktopresize message.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: move size-changed check into the vnc_desktop_resize function.
This make sure we send a desktop resize message only in case we actuallyhave to, using the new variables which track the clients desktop size.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
vnc: factor out vnc_desktop_resize()
vnc: send desktopresize event as reply to set encodings
In case the desktop did resize while the vnc connection setup was stillin progress the client isn't informed about it. Send a desktop resizeevent as soon as the client told us it can handle deskop resize via set...
vnc: keep track of client desktop size
Add two new variables to keep track of the vnc clients desktop size.
Revert "vnc: set the right prefered encoding"
This patch was wrong, because the loop was already reversed,so the first encoding was correctly set at the end of the loopp.
This reverts commit 14eb8b6829ad9dee7035de729e083844a425f274.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>...
vnc: explain why set_encodings loop is reversed
Add a small comment to explain why we need to start fromthe end of the array to set the right prefered encoding.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: really call zlib if we want zlib
send_framebuffer_update() was calling hextile instead of zlibsince commit 70a4568fe0c5a64adaa3da5030b7109e5199e692.
vnc: don't clear zlib stream on set_encoding
On init, values are already NULL, but we shouldn't tryto reset them each time a client send a set encodingcommand because this break everything. For example,libvncclient re-send a set encoding command if the...
vnc: add buffer_free()
Add a buffer_free() helper to free vnc buffers andremove some duplicated code in vnc_disconnect_finish().
vnc: remove a memory leak in zlib
Makes sure we free all ressources used in zlib encoding (zlib streamand buffer).
vnc: return the number of rectangles
Some encodings like tight supports tiling (spliting inmultiple sub-rectangles). So we needed a way to tellvnc_update_client() how much rectangles are in the buffer.
zlib, raw and hextile always send a full rectangle....
vnc: add basic tight support
Add support for tight encoding [1]. This patch only add supportfor "basic" tight compression without any filter.
[1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding.
vnc: rich cursor support.
Uses VNC_ENCODING_RICH_CURSOR. Adding XCURSOR support should bepossible without much trouble. Shouldn't be needed though asRICH_CURSOR is a superset of XCURSOR.
vnc: set the right prefered encoding
message is a hint by the client as to its preference (the firstencoding specified being most preferred)"
vnc: make sure to send pointer type change event on SetEncodings
Commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a introduced a regression whenusing relative mouse mode with a client that understands the PointerTypeChangepseudo-encoding.
Reported-by: Marcelo Tosatti <mtosatti@redhat.com>...
vnc: split encoding in specific files
This will allow to implement new encodings (tight, zrle, ..)in a cleaner way. This may hurt performances, because somefunctions like vnc_convert_pixel are not static anymore, butshould not be a problem with gcc 4.5 and the new -flto....
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove magic numbers for VNC message IDs from code
The code processing incoming & sending outgoing messages from/toclients used embedded magic numbers for all message IDs. Thismade the code a little hard to follow. Add constants in the vnc.hheader file for all message IDs and use them in the code...
input: make vnc use mouse mode notifiers
When we switch to absolute mode, we send out a notification (if the clientsupports it). Today, we only send this notification when the client sends usa mouse event and we're in the wrong mode.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: add no-lock-key-sync option
Add an option to disable the heuristics which try to keepcapslock and numlock state for guest and host in sync.
Fix SIGFPE for vnc display of width/height = 1
During boot, the screen gets resized to height 1 and a mouse click at thispoint will cause a division by zero when calculating the absolute pointerposition from the pixel (x, y). Return a click in the middle of the screen...
monitor: Separate "default monitor" and "current monitor" cleanly
Commits 376253ec..731b0364 introduced global variable cur_mon, whichpoints to the "default monitor" (if any), except during execution ofmonitor_read() or monitor_control_read() it points to the monitor from...
kbd keds: vnc
Use led status notification support in vnc.
The qemu vnc server keeps track of the capslock and numlock states basedon the key presses it receives from the vnc client. But this fails incase the guests idea of the capslock and numlock state changes for other...
Fix curses interaction with keymaps
The combination of keymap support (-k option) and curses is currentlyvery broken. The patch below fixes it by first extending keymap supportto interpret the shift, ctrl, altgr and addupper keywords in keymaps,and to fix curses into properly using keymaps....
vnc: Migrate to using QTAILQ instead of custom implementation
Just a 1-1 conversion for now.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc.c: remove dead code
to= is handled in qemu-sockets.c inet_listen.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vnc_refresh: calling vnc_update_client might free vs
Hi all,this patch fixes another bug in vnc_refresh: calling vnc_update_clientmight cause vs to be free()ed, in this case we cannot access vs->nextright after to examine the next item on the list.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
vnc: Use inet_strfamily()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Introduce VNC_INITIALIZED event
It's emitted when a VNC client session is activated by QEMU,client's information such as port, IP and auth ID (if thesession is authenticated) are provided.
Event example:
{ "event": "VNC_INITIALIZED", "timestamp": {"seconds": 1263475302, "microseconds": 150772},...
VNC: Use 'enabled' key instead of 'status'
Currently the 'status' key is a string whose value can be"disabled" or "enabled", change it to the QMP's standard'enabled' key, which is a bool.
Note that 'status' in being dropped and this wouldn't beallowed if QMP were stable....
VNC: Make 'auth' key mandatory
There is no reason to have it as optional and the codein the server and client gets slightly simpler if thekey is mandatory.
While there also do some cleanup on how the server info iscollected.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
VNC: Rename client's 'username' key
It's the SASL username, so it's better to call it 'sasl_username'to be consistent.
Note that this change wouldn't be allowed if QMP were stable.
VNC: Add 'family' key
It contains the socket adress family name, like "ipv4" or"ipv6".
This is useful for clients so that they can interpret the'host' key reliably.
VNC: Cache client info at connection time
When a disconnection happens the client's socket on QEMUside may become invalid, this way it won't be possibleto query it to get client information, which is going tobe needed by the future QMP VNC_DISCONNECTED event....
QMP: Introduce VNC_CONNECTED event
It's emitted when a VNC client connects to QEMU, client's informationsuch as port and IP address are provided.
Note that this event is emitted right when the connection isestablished. This means that it happens before authentication...
QMP: Introduce VNC_DISCONNECTED event
It's emitted when a VNC client disconnects from QEMU, client'sinformation such as port and IP address are provided.
{ "event": "VNC_DISCONNECTED", "timestamp": { "seconds": 1262976601, "microseconds": 975795 },...
vnc_refresh: return if vd->timer is NULL
Hi all,calling vnc_update_client in vnc_refresh might have the unlikely sideeffect of setting vd->timer = NULL, if the last vnc client disconnected.In this case we have to return from vnc_refresh without updating the...
VNC: Convert do_info_vnc() to QObject
Return a QDict with server information. Connected clients are returnedas a QList of QDicts.
The new functions (vnc_qdict_remote_addr(), vnc_qdict_local_addr() andput_addr_qdict()) are used to insert 'host' and 'service' information...
vnc: fix capslock tracking logic.
The capslock tracking logic added by commit6b1325029d80455b9da7cd7bd84a88cb915b867c doesn't work correctly for vncclients without EXT_KEY_EVENT support. The reason is that qemu convertskeysyms for letters to lowercase for the keysym2scancode lookup. It...
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on filedescriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: improve capslock handling.
When capslock is toggled while the vnc window hasn't the focus qemuwill miss the state change. Add sanity checks for the capslock stateand toggle it if needed, so hosts and guests idea of capslock statestay in sync. Simliar logic for numlock is present in qemu already....
Win32: Fix vnc support.
Without this patch, qemu on windows crashes as soonas a vnc client connects.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: Set invalid buffer pointers to NULL
After qemu_free, the pointers for input and outputbuffers are no longer valid, so set them to NULL(most other calls of qemu_free in vnc.c use thispattern, too).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
fix use after free
We are using the vs structure when it was just freed. Classic use after free,fix it.
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Don't segfault when changing VNC password on an SDL display.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
When using stdio monitor and VNC display, one can set or clear a VNC password; this should set or turn off VNC authentication as well.
variable timer intervals
This patch introduces dynamic timer intervals: we slow down the refreshrate when there in no much activity but we get back to a fast refreshrate when the activity resume.
Please note that qemu_timer_expired is not an inline function any more...
a single vnc timer to refresh the screen
This patch removes the timer per vnc client connected and adds a singletimer to update all the possible clients.We call vga_hw_update only once in the timer handler.
single vnc server surface
This patch removes the server surface from VncState and adds a singleserver surface to VncDisplay for all the possible clients connected.Each client maintains a different dirty bitmap in VncState.The guest surface is moved to VncDisplay as well because we don't need...
vnc: fix copyrect screen corruption
When sending a copyrect command to the vnc client, we must also updatethe local server surface. Otherwise the server's and the client's ideaof the screen content run out of sync and screen updates don't workcorrectly....
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: improve numpad support for qemu console.
Reorganize qemu console emulation code. Make it look at the numlockstate and interpret numpad keys as arrow+friends (numlock off) ordigits (numlock on). While being at it also wind up the other numpadkeys....
vnc: rework VncState release workflow.
Split socket closing and releasing of VncState into two steps. Firstclose the socket and set the variable to -1 to indicate shutdown inprogress. Do the actual release in a few places where we can be sure itdoesn't cause trouble in form of use-after-free. Add some checks for a...
Win32: Don't remove const attribute in type casts.
Type casts removing the const attribute are bad becausethey hide the fact that the argument remains const.
They also result in a compiler warning (at least with MS-C).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Fix mingw32 build warnings
Work around buffer and ioctlsocket argument type signedness problemsSuppress a prototype which is unused on mingw32Expand a macro to avoid warnings from some GCC versions
Fix spelling in comment.
VNC: Fix memory allocation (wrong structure size).
Pointer vs addresses a VncDisplay structure,so it is sufficient to allocate sizeof(VncDisplay)or sizeof(*vs) bytes instead of the much largersizeof(VncState).
Maybe the misleading name should be fixed, too:...
Eliminate --disable-gfx-check and make VNC default when SDL not available
--disable-gfx-check predates VNC server support. It made sense back thenbecause the only thing you could do without SDL was use -nographic mode orsimilar tricks. Since this is a very advanced mode of operation, gfx-check...
Remove any pretense that there can be more than one AudioState
vnc: kill leftover debug statement.
vnc: windup keypad keys for qemu console emulation
vnc: fix segfault
Move down cmp_bytes initialization. Must be after vga_hw_update()call, because that one might change the screen depth.
vnc: fix server surface pixel format.
Format must be identical to the guest surface, we can't work withthe 32 bpp used by the default surface allocator.
Without this patch vnc doesn't get the conversions right when sendingpixel data to the client. The bug triggers if...
vnc: no need to set force_update for incremental update requests.
vnc: Fix incorrect attempt to clear a flag
In vnc.c in pixel_format_message, the code tries to clear theQEMU_ALLOCATED_FLAG from the client display surface, howeverit uses the wrong operator and ends up enabling all otherflags. Most notably this enables the big endian flag and...
vnc: throttle screen updates. (Gerd Hoffmann)
This patch makes the vnc server code skip screen refreshes in casethere is data in the output buffer. This reduces the refresh rate tothrottle the bandwidth needed in case the network link is saturated.
vnc: fix printf warnings showing up with VNC_DEBUG enabled. (Gerd Hoffmann)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6861 c046a42c-6fe2-441c-8c8c-71466251a162
vnc: cleanup surface handling, fix screen corruption bug. (Gerd Hoffmann)
This patch killes the old_data hack in the qemu server and replacesit with a clean separation of the guest-visible display surface andthe vnc server display surface. Both guest and server surface have...
Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
Replace asprintf() with snprintf() in vnc.c ("Daniel P. Berrange")
As previously discussed, this patch removes the non-portable use ofasprintf(), replacing it with malloc+snprintf instead
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Remove tabs introduced from VNC ACL series
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6727 c046a42c-6fe2-441c-8c8c-71466251a162
Support ACLs for controlling VNC access ("Daniel P. Berrange")
This patch introduces a generic internal API for access control liststo be used by network servers in QEMU. It adds support for checkingthese ACL in the VNC server, in two places. The first ACL is for the...
Include auth credentials in 'info vnc' ("Daniel P. Berrange")
This patch extends the 'info vnc' monitor output to include informationabout the VNC client authentication credentials.
For clients authenticated using SASL, this will output the username.
For clients authenticated using x509 certificates, this will output...
Add SASL authentication support ("Daniel P. Berrange")
This patch adds the new SASL authentication protocol to the VNC server.
It is enabled by setting the 'sasl' flag when launching VNC. SASL canoptionally provide encryption via its SSF layer, if a suitable mechanism...
Move TLS auth into separate file ("Daniel P. Berrange")
This patch refactors the existing TLS code to make the main VNC codemore 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....
Move VNC structs into header file ("Daniel P. Berrange")
This patch moves the definitions of VncState and VncDisplay structsout into a vnc.h header file. This is to allow the code for TLSand SASL auth mechanisms to be moved out of the main vnc.c file....
Refactor keymap code to avoid duplication ("Daniel P. Berrange")
Each of the graphical frontends #include a .c file, for keymap coderesulting in duplicated definitions & duplicated compiled code. Acouple of small changes allowed this to be sanitized, so instead of...
Enhance 'info vnc' monitor output ("Daniel P. Berrange")
The current 'info vnc' monitor output just displays the VNC server addressas provided by the -vnc command line flag. This isn't particularly usefulsince it doesn't tell you what VNC is actually listening on. eg, if you...
Fix bug in TLS authentication ("Daniel P. Berrange")
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, QEMUsends the next 'start sub-auth' message twice. This seriously confuses...
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
Support multiple VNC clients (Brian Kress)
Change structure associated with a display from VncState to a new structureVncDisplay. Remove client specific fields from VncDisplay. Remove displayspecific fields from VncState. Maintain a linked list of VncStates per...
monitor: Don't change VNC server when disabled (Jan Kiszka)
[ As requested, broken out of the monitor rework series. ]
Avoid a segfault when the user issues 'change vnc' without having vncenabled on startup.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Add zlib encoding support (Alexander Graf)
This patch adds zlib encoding support for VNC. It basically runsthe raw traffic through zlib, providing a pretty good compressionratio.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Move the framebuffer update package out (Alexander Graf)
Currently the send_framebuffer_update_raw and send_framebuffer_update_hextilerespectively send a send_framebuffer_update packet themselves. We need to reusesend_framebuffer_update_raw for zlib encoding though, so let's move it out....
Move buffer functions up (Alexander Graf)
We will need to use buffer functions in code that will end up beingbelow the current buffer functions. In order to not introduce anyfunction stub defines, let's just move them up.
Signed-off-by: Alexander Graf <agraf@suse.de>...
Add some tight awareness to vnc.c (Alexander Graf)
This patch enables the vnc server to understand fundamental tight extensions.It changes from a "Hextile or not" scheme when sending framebuffer updates toa "preferred encoding", namely the last one set....
Fix invalid #if in vnc.c when debugging is enabled (Alexander Graf)
While running with debugging enabled, I found an #if testing foran undefined value, not defined(value). This patch fixes that.
Use VNC protocol defines (Alexander Graf)
Now that we have nice defines for all sorts of constants, let'suse them!
This patch also takes the "feature variables", currently called has_*into a single feature int. This way adding new features is a loteasier and doesn't clutter the VncState struct....
Split VNC defines to vnc.h (Alexander Graf)
The VNC protocol contains quite some constants, some of which arecurrently hardcoded in the vnc.c code. This is not exactly pretty.
Let's move all those constants out to vnc.h, so they are clearlyseparated. While at it, I also included other defines that will be...
vnc fixes and improvements (Stefano Stabellini)
this patch fixes a bug and improves the generic pixel conversionfunction in vnc.c.The bug is that when a new vnc client connects we need to reset the flaghas_WMVi but currently we don't.The generic pixel conversion function is vnc_convert_pixel and currently...
exploiting the new interface in vnc.c (Stefano Stabellini)
This patch exploits the new DisplaySurface and PixelFormat structures invnc, making the code easier to read allowing further improvements.
Compared to the last version I fixed a bug that prevented the hextile...
DisplayState interface change (Stefano Stabellini)
This patch changes the DisplayState interface adding support formultiple frontends at the same time (sdl and vnc) and implements mostof the benefit of the shared_buf patch without the added complexity....
Fix some more warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6300 c046a42c-6fe2-441c-8c8c-71466251a162
Properly handle the case of SetPixelEncodings with a length of zero.
This commit addresses CORE-2008-1210/CVE-2008-2382.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6121 c046a42c-6fe2-441c-8c8c-71466251a162
vnc: Fix crash on 'info vnc' after 'change vnc none'
vnc_state->display is set to NULL after "change vnc none" but vnc_state itselfis still valid.
(James Ko)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6010 c046a42c-6fe2-441c-8c8c-71466251a162
Make audio violate POSIX less
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
Exclude unix: from vnc call to unix_listen() (Ryan Harper)
When using an existing unix socket like:
-vnc unix:/tmp/file1Y2nY2
qemu fails to bind a unix socket because the vnc call to unix_listen includesthe unix: prefix and stores that in the unix.sun_path. The fix is to not pass...