| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's quite a bad hack, but I can't think of anything really better
Without this patch, g-ir-scanner introspection hangs with:
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion `boxed_copy != NULL' failed
GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed
GLib-GObject-WARNING **: gsignal.c:1585: parameter 1 of type `<invalid>' for sig
nal "SpiceSmartcardManager::reader_added" is not a value type
|
| |
|
| |
|
|
|
|
|
|
|
| |
It is useful to have a way to prevent sending commands in read-only
sessions (think of multi-client)
No clipboard sharing allowed in this case in gtk-session.
|
| |
|
| |
|
| |
|
|
|
|
| |
The helper needs to be accessible from spice-client-gtk too.
|
|
|
|
| |
We should use update-map-file instead of modifying it manually
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usb acl helper asks policykit, which may want to interact with the
user through the policykit agent, which wants to grab the keyboard, if
we then have the keyboard grabbed, the agent says authentication has failed,
policykit rejects the helper opening up the acl and usbredir won't work.
Unfortunately the only way to work around this is to temporarily release our
own keyboard grab, not pretty but as discussed on irc, this is the "best"
solution.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
spice-client needs to be able to open the device nodes under /dev/bus/usb
to be able to redirect a usb device to the guest. Normally opening these
nodes is only allowed by root. This patch adds a suid root helper which
asks policykit if it is ok to grant raw usb device access, and if policykit
says it is ok, opens up the acl so that the spice-client can open the device
node.
As soon as spice-client closes the stdin of the helper, the helper removes
the extra rights. This ensures that the acl gets put back to normal even if
the spice client crashes. Normally the spice-client closes stdin directly
after opening the device node.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the (upcoming) introduction of the usb device node acl helper, which
uses policykit, spice_usbredir_channel_connect() may take a long time as
it will be waiting for the helper, which will be waiting for policykit which
may be interacting with the user -> Make spice_usbredir_channel_connect() async
Note that this patch only changes spice_usbredir_channel_connect's
API to use the standard GIO async API, it is not actually async after this
patch since it does not yet call the acl helper.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the (upcoming) introduction of the usb device node acl helper, which
uses policykit, spice_usbredir_channel_connect() may take a long time as
it will be waiting for the helper, which will be waiting for policykit which
may be interacting with the user. So spice_usbredir_channel_connect() will
need to become async, and since spice_usb_device_manager_connect_device
calls spice_usbredir_channel_connect it thus also needs to become async.
Note that this patch only changes spice_usb_device_manager_connect_device's
API to use the standard GIO async API, it is not actually async after this
patch since spice_usbredir_channel_connect is not yet async.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
This is a preparation patch for adding the usb device node acl helper
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
glib does not like it when objects have a private data size of 0, so don't
declare any private data when compiling without USE_USBREDIR set.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
This was introduced post 0.7, and given the major changes done in git
sofar the next release will be 0.8 rather then 0.7.1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
| |
|
|
|
|
| |
This is not really clean, as it may conflict with client usage
|
|
|
|
| |
Private data in GObject's is initialized to 0's upon constuction
|
| |
|
| |
|
|
|
|
| |
Create audio channels only if enable-audio is TRUE
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are going to deprecate spice_audio_new()
some day. There are a few know problems:
- SpiceAudio is an abstract class,
so it can't have a ctor
- SpiceAudio should be a singleton,
associated with the session lifetime
- SpiceSession should have a enable-audio property,
internal code should be able to access the audio object
That way of getting the audio object is similar to the smartcard manager and usb manager.
|
|
|
|
|
| |
It can happen if the display is not yet ready.
This change just removes a couple of warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Little patch to make spice-gtk accept RFC-conform URLs of the form
"spice://host/?port=5901".
I didn't add '/' to the list of the other characters to ignore (?;&)
by intention since an URL like spice://host/?port=5901/somotherstuff
should not be valid, resp. the password may contain '/' because the
string is already unescaped at that point.
Unfortunately glib does not seem to have functions to 'explode' an URI
which would be really helpful.
Cheers,
Tiziano
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=41988
|
| |
|
|
|
|
| |
This doesn't break ABI, as int and enum are compatible at glib level.
|
| |
|
|
|
|
|
|
| |
Brown paper bag bug number 2 wrt spice-gtk-session-priv.h, sorry about this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
This file was missing from the previous commit, my bad.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
The SpiceGtkSession ones should be used instead.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The auto-clipboard setting now lives in the SpiceGtkSession, if that
was changed to FALSE (from the default of TRUE) and later a SpiceDisplay
was created for this session that would change it back to TRUE again because
it would set it to its default from its constructor. This patch fixes this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Auto-generated files do not belong in git. Having these in git causes
changes to them accidentally ending up in other commits.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
This was broken by the addition of SpiceGtkSession.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With multi monitor guests, it is possible for a glz-image to refer to
bits from another glz-image which has not arrived yet! This can happen
because each monitor has its own display channel, and thus its own socket,
but they share the glz dict. Thus things can arrive out of order, with a
glz-image on display 1 arriving before the glz-image on display 2 which it
refers too.
This triggers the:
g_return_val_if_fail(w->images[slot]->hdr.id == id - dist, NULL);
In glz_decoder_window_bits(), which is what caused me to debug this, once
the out order thing was clear, so was the fix.
If w->images[slot]->hdr.id == id - dist is not true, we need to wait for the
correct image to arrive.
The out of order issue with multiple monitors can also trigger the
g_warn_if_reached() in glz_decoder_window_resize(), so remove that.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since some SpiceDisplay properties are now just a pass through to the
equivalent SpiceGtkSession property, we also need to pass on the notify
signal for these, so interested users can get notified of them changing.
Use this in spicy to ensure that changes to SpiceGtkSession (and thus per
session rather then per window) properties get reflected in all windows for
a multimonitor guest.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since usb device manager keeps track of which usb channels there are and
if they have usb devices attached there should be one usb-device-manager
instance per session, rather then one global singleton.
Tying the usb-device-manager to the session also allows us to get rid of
spice_usb_device_manager_[un]register_channel and the need for SpiceDisplay
to call these.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|