summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Remove unused variablesChristophe Fergeau2014-01-022-3/+0
| | | | | coverity spotted some variables that were declared but not used in server/tests
* Fix typo; sampel --> sampleJeremy White2014-01-0211-45/+45
| | | | Signed-off-by: Jeremy White <jwhite@codeweavers.com>
* Add support for the Opus codecJeremy White2014-01-0214-87/+188
| | | | Signed-off-by: Jeremy White <jwhite@codeweavers.com>
* Revise the spice client and server to use the new snd_codec functions in ↵Jeremy White2014-01-028-210/+150
| | | | | | | | spice-common. This makes celt optional, and paves the way to readily add additional codecs. Signed-off-by: Jeremy White <jwhite@codeweavers.com>
* Use TLS version 1.0 or betterDavid Jaša2013-12-121-1/+4
| | | | | | | | | | | | | When creating a TLS socket, both spice-server and spice-gtk currently call SSL_CTX_new(TLSv1_method()). The TLSv1_method() function set the protocol version to TLS 1.0 exclusively. The correct way to support multiple protocol versions is to call SSLv23_method() in spite of its scary name. This method will enable all SSL/TLS protocol versions. The protocol suite may be further narrowed down by setting respective SSL_OP_NO_<version_code> options of SSL context. This possibility is used in this patch in order to block use of SSLv3 that is enabled by default in openssl for client sockets as of now but spice has never used it.
* Remove empty red_time.cChristophe Fergeau2013-12-111-1/+0
|
* Add red_time.h to Makefile.amChristophe Fergeau2013-12-111-0/+1
| | | | | | This file was added in bc50ff076 a few months ago, but is not listed in Makefile.am, and thus not part of tarballs. However, it's being included from other C files, so not having it causes compilation breakage.
* Update git-version-gen to latest versionChristophe Fergeau2013-12-111-49/+116
| | | | | Pick the latest git-version-gen version from http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/git-version-gen
* Add .version to EXTRA_DISTChristophe Fergeau2013-12-111-0/+1
| | | | | | | Newer versions of git-version-gen document that it should be done, and builddir != srcdir builds are broken if it's not present in the tarball as we'd attempt to generate this file in the read-only source directory (if the source dir is read-only)
* Fix snappy detection with newer spice-gtkChristophe Fergeau2013-12-111-3/+3
| | | | It was renamed to spicy-screenshot
* Require alsa only with --enable-clientChristian Ruppert2013-11-041-6/+6
| | | | | | | | | | | | | | | | Hey guys, the alsa libraries/header seem to be required only when configured with --enable-client so I wrote a patch to make configure respect it. -- Regards, Christian Ruppert From 53683cc75ba092799f856f710cb45b2aacfb6123 Mon Sep 17 00:00:00 2001 From: Christian Ruppert <idl0r@gentoo.org> Date: Sun, 3 Nov 2013 18:36:26 +0100 Subject: [PATCH] Require alsa only with --enable-client
* Fix buffer overflow when decrypting client SPICE ticketChristophe Fergeau2013-10-301-12/+32
| | | | | | | | | | | | | | | | | | | | | | | reds_handle_ticket uses a fixed size 'password' buffer for the decrypted password whose size is SPICE_MAX_PASSWORD_LENGTH. However, RSA_private_decrypt which we call for the decryption expects the destination buffer to be at least RSA_size(link->tiTicketing.rsa) bytes long. On my spice-server build, SPICE_MAX_PASSWORD_LENGTH is 60 while RSA_size() is 128, so we end up overflowing 'password' when using long passwords (this was reproduced using the string: 'fullscreen=1proxy=#enter proxy here; e.g spice_proxy = http://[proxy]:[port]' as a password). When the overflow occurs, QEMU dies with: *** stack smashing detected ***: qemu-system-x86_64 terminated This commit ensures we use a corectly sized 'password' buffer, and that it's correctly nul-terminated so that we can use strcmp instead of strncmp. To keep using strncmp, we'd need to figure out which one of 'password' and 'taTicket.password' is the smaller buffer, and use that size. This fixes rhbz#999839
* Remove tunneling supportChristophe Fergeau2013-10-2810-4575/+1
| | | | | | It's depending on an unmaintained package (slirp), and I don't think anyone uses that code. It's not tested upstream nor in fedora, so let's remove it.
* Silence gcc false positive with -WuninitializedChristophe Fergeau2013-10-281-0/+6
| | | | | | | | | | | | | | | | | Some versions of gcc warn about: red_channel.c: In function 'red_channel_client_wait_outgoing_item': red_channel.c:2331: error: 'end_time' may be used uninitialized in this function [-Wuninitialized] red_channel.c: In function 'red_channel_client_wait_pipe_item_sent': red_channel.c:2363: error: 'end_time' may be used uninitialized in this function [-Wuninitialized] red_channel.c: In function 'red_channel_wait_all_sent': red_channel.c:2401: error: 'end_time' may be used uninitialized in this function [-Wuninitialized] This is a false positive as end_time is unitialized when timeout is -1, and we will only try to use end_time if timeout is not -1. This commit initializes end_time to UINT64_MAX to avoid that warning. As the test involving end_time will never be reached, we ensure it's always TRUE so that it would be a noop even if it was reached.
* red_tunnel_worker: Fix build error due to missing monitor_latency argumentAxel Lin2013-10-181-1/+1
| | | | | | Fix missing monitor_latency argument in red_channel_client_create call. Signed-off-by: Axel Lin <axel.lin@ingics.com>
* Use latest warnings.m4 from gnulibChristophe Fergeau2013-10-101-20/+62
| | | | This fixes at least some issues when building with clang
* Use hardened linker flags if availableChristophe Fergeau2013-10-104-0/+71
| | | | | | This commit reuse several macros from libvirt to test for support for "-Wl,-z -Wl,relro", "-Wl,-z -Wl,now" and "-Wl,--no-copy-dt-needed-entries", and use them if available.
* Don't ignore all of m4/ in .gitignoreChristophe Fergeau2013-10-101-1/+5
| | | | | m4/ contains several files tracked in git, so we should not ignore the whole directory.
* Fix PlaybackeCommand typoChristophe Fergeau2013-10-091-1/+1
|
* Fix an overlooked x11 client case.Jeremy White2013-10-091-0/+2
| | | | Signed-off-by: Jeremy White <jwhite@codeweavers.com>
* reds: remove dead codeMarc-André Lureau2013-10-081-33/+0
|
* reds: Fix 'asyc' typoChristophe Fergeau2013-10-081-23/+23
|
* Fix 'recive' typo throughout the code baseChristophe Fergeau2013-10-084-63/+63
| | | | 'receive' was mispelt 'recive' in multiple places.
* Namespace RECEIVE_BUF_SIZEChristophe Fergeau2013-10-083-9/+9
|
* server: handle red_get_surface_cmd() error explicitelyMarc-André Lureau2013-10-071-24/+32
| | | | | Don't ignore red_get_surface_cmd() error, and explicitely interrupt and free cmd before processing.
* server: plug some leaks on errorMarc-André Lureau2013-10-071-2/+7
| | | | | Plug what looks like memory leaks, that could be potentially be triggered by a misbehaving guest.
* server: inputs s/relase/releaseMarc-André Lureau2013-10-071-2/+2
|
* server: release all pressed keys on client disconnectMarc-André Lureau2013-10-071-7/+35
| | | | | | | | | | | | | Releasing modifiers keys unconditionally on disconnect leads to unexpected guest wakeups. To improve the situation, the server can release only the pressed keys, which will prevent the wakeup in most cases. Furthermore, it's not sufficient to release only the modifiers keys. Any key should be released on client disconnect to avoid sticky key press across connections. https://bugzilla.redhat.com/show_bug.cgi?id=871240
* server: mark deprecated symbolsMarc-André Lureau2013-10-072-22/+30
|
* server/tests: avoid using deprecated symbolsMarc-André Lureau2013-10-071-7/+6
|
* server: set dispatcher before calling attache_workerMarc-André Lureau2013-10-073-7/+10
| | | | | This allows to call spice_qxl_add_memslot during attache_worker(), like done in the tests.
* Update spice-commonMarc-André Lureau2013-10-071-0/+0
|
* server: remove memslot unused functionsMarc-André Lureau2013-10-012-51/+0
|
* cleanup: remove GITVERSIONMarc-André Lureau2013-09-301-0/+0
| | | | This file is unneeded since d986fb46
* server: remove unused fill_rects_clipMarc-André Lureau2013-09-301-11/+0
| | | | Unused since 62d0c076eb2eb0f9954c3870f31b4dd685e5f95c.
* spicec: disable stencil test with primary fboMarc-André Lureau2013-09-302-1/+2
| | | | | | | The primary buffer doesn't use stencil test. However, this should be explicitely disabled, since the canvas might change stencil state, and this will affect primary stencil buffer, making some of further update operations clipped in unwanted ways.
* spicec: use pre/post copyMarc-André Lureau2013-09-301-0/+2
| | | | Ensure the GL state is appropriate for calling GCanvas::copy_pixels.
* spicec: add sw canvas diff checkMarc-André Lureau2013-09-304-24/+88
| | | | | | | | | | | | | Setting CHECKDIFF=1 environment variable will compare the rendering of the selected canvas with a software canvas. This is useful for debugging some rendering issues, however it is far from being perfect, since it's not able to tell whether one or the other is actually faulty. It's a strong indication though of which operations are incorrect. Ideally, all operations should be checked, however, a few of them are disabled by default because they fail all the time, and it looks like pixman is not very accurate for blending/compositing (at least visually, it seems gl has better rendering)
* spicec: do not abort if cache errorMarc-André Lureau2013-09-301-1/+2
|
* spicec: add SPICE_NOGRABMarc-André Lureau2013-09-301-0/+7
| | | | | Similar to spice-gtk, disable mouse and keyboard grab (useful when running under a debugger)
* spicec: remove dead GL codeMarc-André Lureau2013-09-302-34/+0
|
* spicec: use doublebuffer for openglMarc-André Lureau2013-09-305-3/+16
| | | | | | This visually reduces glitches without noticeable speed difference. It's also the traditionnal way of doing opengl.
* spicec: fix non-doublebuffer drawingMarc-André Lureau2013-09-303-0/+4
| | | | | | | | First, context must set it, then Draw/ReadBuffer must be set to FRONT, and then explicit Flush is needed. This patch is mostly for future reference, it is mostly discarded in following patch using double-buffer.
* spicec: use standard opengl 3.0 framebufferMarc-André Lureau2013-09-303-47/+50
|
* spicec: refresh the display after display resizeMarc-André Lureau2013-09-301-0/+4
|
* spicec: warn when throwing exceptionMarc-André Lureau2013-09-301-0/+3
| | | | This helps to identify the code location of exception
* update spice-commonMarc-André Lureau2013-09-301-0/+0
|
* red_worker: disconnect the channel instead of shutdown in case of a blocking ↵Yonit Halperin2013-09-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | method failure rhbz#1004443 The methods that trigger waitings on the client pipe require that the waiting will succeed in order to continue, or otherwise, that all the living pipe items will be released (e.g., when we must destroy a surface, we need that all its related pipe items will be released). Shutdown of the socket will eventually trigger red_channel_client_disconnect (*), which will empty the pipe. However, if the blocking method failed, we need to empty the pipe synchronously. It is not safe(**) to call red_channel_client_disconnect from ChannelCbs , but all the blocking calls in red_worker are done from callbacks that are triggered from the device. To summarize, calling red_channel_client_disconnect instead of calling red_channel_client_shutdown will immediately release all the pipe items that are held by the channel client (by calling red_channel_client_pipe_clear). If red_clear_surface_drawables_from_pipe timeouts, red_channel_client_disconnect will make sure that the surface we wish to release is not referenced by any pipe-item. (*) After a shutdown of a socket, we expect that later, when red_peer_handle_incoming is called, it will encounter a socket error and will call the channel's on_error callback which calls red_channel_client_disconnect. (**) I believe it was not safe before commit 2d2121a17038bc0 (before adding ref count to ChannelClient). However, I think it might still be unsafe, because red_channel_client_disconnect sets rcc->stream to NULL, and rcc->stream may be referred later inside a red_channel_client method unsafely. So instead of checking if (stream != NULL) after calling callbacks, we try to avoid calling red_channel_client_disconnect from callbacks.
* red_channel: cleanup of red_channel_client blocking methodsYonit Halperin2013-09-263-57/+93
| | | | | | (1) receive timeout as a parameter. (2) add a return value and pass the handling of failures to the calling routine.
* red_worker: cleanup red_clear_surface_drawables_from_pipesYonit Halperin2013-09-261-12/+18
| | | | | | (1) merge 'force' and 'wait_for_outgoing_item' to one parameter. 'wait_for_outgoing_item' is a derivative of 'force'. (2) move the call to red_wait_outgoing_item to red_clear_surface_drawables_from_pipe