Commit Graph

1824 Commits

Author SHA1 Message Date
Marc-André Lureau
06d646352e manual: add folder sharing section 2014-03-19 17:14:44 +01:00
Marc-André Lureau
2e730453bf Translate docbook -> asciidoc
It's much much easier to read and edit, and the end results looks better
as well, see http://elmarco.fedorapeople.org/manual.html
2014-03-19 17:14:44 +01:00
Marc-André Lureau
25f6745202 Associate org.spice-space.webdav.0 port to webdav channel
For example, with qemu, a webdav channel can be created this way:

 -chardev spiceport,name=org.spice-space.webdav.0,...

And redirected to a virtio port:

 -device virtserialport,...,name=org.spice-space.webdav.0
2014-03-19 17:14:44 +01:00
Marc-André Lureau
e044cfca1e build-sys: simplify manual html generation 2014-03-19 14:01:33 +01:00
Marc-André Lureau
f8bc446b76 SpiceUserManual.xml: small clean-ups
Remove some non-conventional/non-freesoftware editor-specific lines.

Remove trailing whitespaces

Get rid of DTD, which is too strict for docbook, see also:
http://docbook.org/tdg5/en/html/ch02.html

This get rids of the following warning/error:

I/O error : Attempt to load network entity
http://docbook.org/xml/5.0/dtd/docbook.dtd
/home/elmarco/src/spice/spice-master/docs/manual/SpiceUserManual.xml:4:
warning: failed to load external entity
"http://docbook.org/xml/5.0/dtd/docbook.dtd"
          "http://docbook.org/xml/5.0/dtd/docbook.dtd">
                                                       ^
2014-03-19 14:01:30 +01:00
Christophe Fergeau
660d63253d Fix test_capability() typo
It was spelt 'capabilty'
2014-03-13 17:13:38 +01:00
Christophe Fergeau
24e2e60a59 Fix typo in log message 2014-03-13 17:13:33 +01:00
Christophe Fergeau
67be56ad8a mjpeg: Don't warn on unsupported image formats
When trying to start mjpeg compression mode, mjpeg_encoder_start_frame()
tests the image format as its only able to compress 24/32bpp images. On
images with lower bit depths, we return MJPEG_ENCODER_FRAME_UNSUPPORTED to
indicate this is not a format we can compress. However, this return goes
with a spice_warning("unsupported format"). As the rest of the code can
cope with this unsupported format by not doing mjpeg compression, it's
nicer to downgrade this spice_warning() to spice_debug().

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1070028
2014-03-13 17:13:27 +01:00
Christophe Fergeau
7095563153 Add reference manual
This manual documents how to enable/use various SPICE features when
creating a VM by running QEMU directly, or when using libvirt, or when
using virt-manager.
This is based on work by Lubos Kocman
2014-01-20 12:18:15 +01:00
Christophe Fergeau
2ea58dd7a7 Make RedsStream::info private 2014-01-20 12:15:42 +01:00
Christophe Fergeau
28fa3b1b3f Introduce reds_stream_set_channel() 2014-01-20 12:15:42 +01:00
Christophe Fergeau
82511418a0 Introduce reds_stream_set_info_flag() 2014-01-20 12:15:42 +01:00
Christophe Fergeau
25aca54f12 Make RedsStream::async_read private 2014-01-20 12:15:42 +01:00
Christophe Fergeau
dc04c076ef Make RedsStream::sasl private 2014-01-20 12:15:42 +01:00
Christophe Fergeau
284f9d0d7a Make RedsStream read/write functions private 2014-01-20 12:15:42 +01:00
Christophe Fergeau
520ebdc815 Make RedsStream::ssl private 2014-01-20 12:15:42 +01:00
Christophe Fergeau
30fecf87f8 Introduce reds_stream_is_ssl() 2014-01-20 12:15:42 +01:00
Christophe Fergeau
1f7123298f Add RedsStream::priv
The private data is allocated at the same time as RedsStream and
goes immediatly after the main RedsStream data.
This private member will allow to hide internal RedsStream
implementation details from the rest of spice-server.
2014-01-20 12:15:42 +01:00
Christophe Fergeau
7ff743c431 Move SASL authentication to reds_stream.h
SASL authentication mostly use members from RedsStream to do its work, so
it makes sense to have its code in reds_stream.c. This should allow to make
RedsStream::sasl private in the future.
2014-01-20 12:15:42 +01:00
Christophe Fergeau
9feed6940f Move async code to RedsStream
The AsyncRead structure in reds.h wraps an async read + callback to
be done on a stream. Moving it to reds_stream.h is needed in order
to move SASL authentication there.
2014-01-20 12:15:42 +01:00
Christophe Fergeau
cdaab7272c Move stream read/write callbacks to reds_stream.c
Now that stream creation and SSL enabling are done by helpers
in reds_stream.c, we can move the initialization of the vfunc
read/write pointers there too.
2014-01-20 12:15:41 +01:00
Christophe Fergeau
e0abf1adc2 Introduce reds_stream_new() helper
Initializing a new stream means initializing quite a few fields.
This commit factors this initialization in a dedicated reds_stream_new
helper. This also helps moving more code from reds.c to reds_stream.c
2014-01-20 12:15:41 +01:00
Christophe Fergeau
d533f72fe6 reds: Move SSL-related code to RedsStream
Code to initiate a SSL stream belongs there
2014-01-20 12:15:41 +01:00
Christophe Fergeau
e46743100f Move sync_write* to reds_stream.h
They are renamed to reds_stream_write*
2014-01-20 12:15:41 +01:00
Christophe Fergeau
8b347a641c Add reds_stream.[ch]
Gather common RedsStream code there rather than having it
in reds.c
2014-01-20 12:15:41 +01:00
Christophe Fergeau
73c56e5a2d Move SPICE_GNUC_VISIBLE to red_common.h 2014-01-20 12:15:41 +01:00
Christophe Fergeau
7d9018d441 tests: Avoid malloc failures
test-display-streaming is calling malloc() without checking its return
value. Coverity warns about this. This commit switches to g_malloc() to
sidestep this warning (g_malloc() never returns NULL but aborts instead).
2014-01-02 18:07:16 +01:00
Christophe Fergeau
3ac428b4b7 tests: Remove unused variables
coverity spotted some variables that were declared but not used in
server/tests
2014-01-02 18:06:08 +01:00
Jeremy White
530888ad90 Fix typo; sampel --> sample
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:39:04 +01:00
Jeremy White
ce9b714137 Add support for the Opus codec
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:36:59 +01:00
Jeremy White
4c7c0ef3a7 Revise the spice client and server to use the new snd_codec functions in spice-common.
This makes celt optional, and paves the way to readily add additional codecs.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:34:34 +01:00
David Jaša
4fc9ba5f27 Use TLS version 1.0 or better
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.
2013-12-12 10:39:11 +01:00
Christophe Fergeau
f4f033a09c Remove empty red_time.c 2013-12-11 16:45:59 +01:00
Christophe Fergeau
1b77a2c073 Add red_time.h to Makefile.am
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.
2013-12-11 16:45:50 +01:00
Christophe Fergeau
74300144f8 Update git-version-gen to latest version
Pick the latest git-version-gen version from
http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/git-version-gen
2013-12-11 16:32:36 +01:00
Christophe Fergeau
2c6fbad8c5 Add .version to EXTRA_DIST
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)
2013-12-11 16:31:05 +01:00
Christophe Fergeau
686750e49c Fix snappy detection with newer spice-gtk
It was renamed to spicy-screenshot
2013-12-11 16:12:19 +01:00
Christian Ruppert
58195c1951 Require alsa only with --enable-client
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
2013-11-04 12:02:16 +01:00
Christophe Fergeau
8af6190096 Fix buffer overflow when decrypting client SPICE ticket
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
2013-10-30 10:40:50 +01:00
Christophe Fergeau
ef9a8bf053 Remove tunneling support
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.
2013-10-28 11:12:27 +01:00
Christophe Fergeau
1b6ced7dda Silence gcc false positive with -Wuninitialized
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.
2013-10-28 11:12:20 +01:00
Axel Lin
56e7876d8f red_tunnel_worker: Fix build error due to missing monitor_latency argument
Fix missing monitor_latency argument in red_channel_client_create call.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2013-10-18 15:12:50 +02:00
Christophe Fergeau
f0336ac832 Use latest warnings.m4 from gnulib
This fixes at least some issues when building with clang
2013-10-10 11:20:08 +02:00
Christophe Fergeau
ceb672bf85 Use hardened linker flags if available
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.
2013-10-10 11:17:52 +02:00
Christophe Fergeau
f78f1ae61b Don't ignore all of m4/ in .gitignore
m4/ contains several files tracked in git, so we should not ignore
the whole directory.
2013-10-10 11:17:17 +02:00
Christophe Fergeau
c9ea4538e2 Fix PlaybackeCommand typo 2013-10-09 19:03:37 +02:00
Jeremy White
b634009bf0 Fix an overlooked x11 client case.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2013-10-09 19:03:37 +02:00
Marc-André Lureau
6e92dcbbba reds: remove dead code 2013-10-08 19:57:00 +02:00
Christophe Fergeau
edfb16a55d reds: Fix 'asyc' typo 2013-10-08 19:07:44 +02:00
Christophe Fergeau
df96538e1f Fix 'recive' typo throughout the code base
'receive' was mispelt 'recive' in multiple places.
2013-10-08 19:07:42 +02:00