Age | Commit message (Collapse) | Author | Files | Lines |
|
It's not obvious how qemu should be started so that vdagentd can
find its com.redhat.spice.0 virtio device. It's explained at
http://spice-space.org/page/Whiteboard/AgentProtocol but is easier
to find if it's explained in README too.
|
|
|
|
Note: Our event loop is only called when there is data to be read from the
X11 socket. If events have arrived and have already been read by libX11 from
the socket triggered by other libX11 calls from this file, the select for
read in the main loop, won't see these and our event loop won't get called!
Thus we must make sure that all queued events have been consumed, whenever
we return to the main loop. IOW all (externally callable) functions in this
file must end with calling XPending and consuming all queued events.
Calling XPending when-ever we return to the mainloop also ensures any
pending writes are flushed.
|
|
|
|
|
|
|
|
This avoids the need to do a memcpy if the read callback wants to keep
the data around. This makes the read callback responsible for freeing the
buffer.
|
|
|
|
|
|
Before this patch vdagent-virtio-port was assembling vdagent messages
which consist of multiple chunks without looking at the chunk header port
attribute. But it is possible to receive a vdagent-message which spans
multiple chunks for port 1, and while receiving the chunks for this message,
receive an unrelated chunk for port 2. Before this patch that chunk would
(wrongly) get added to the message for port2, messing things seriously up.
|
|
Don't pass the chunk header, only the chunk port nr, to the read callback,
the size part of the chunk header is irrelavant, esp. as the entire
vdagent message could have been divided over multiple chunks.
|
|
The chunks being send over the vdagent virtio port are multiplexed and
contain a member inside there header called port, rename all port function
parameters to vport, since they refer to a vdagent-virtio-port, and not a
port in the meaning it has inside of a chunk.
|
|
the header
|
|
gnome-session will wait for autostartup "apps" marked with
X-GNOME-Autostart-Phase=Initialization to signal they've completed starting
or do an exit 0, before continuing with the next startup phase. Since we were
doing neither, it would wait for a timeout until continueing causing a
noticable delay before gdm showing the greeter, and after login. By
daemonizing immediately after startup we avoid this delay without needing
to go talk XSMP or something similar.
|
|
|
|
There is little use in opening the virtio port when uinput creation has failed,
since we will exit as soon as control is returned back to the main loop.
|
|
uinput may be a module and it does not autoload properly on all systems
|
|
|
|
|
|
Rather then refusing to use the monitor config send by the client at
all for multi monitor clients, simply take the info from the first monitor.
|
|
Exit with an exit code of 0 (iow everything ok), rather then 6 (lsb:
program not configured) when started while not running under a spice
enabled vm.
|
|
This makes it easier to write an selinux policy for spice-vdagent and allows
for adding extra logfiles / sockets in the future without needing a policy
change.
|
|
|
|
Having it in runlevels without X is not useful
|
|
Now that it is no longer launched by a udev rule it does not need to be in
/sbin.
|
|
|
|
|
|
|
|
This is necessary if the previous daemon crashed (exited without cleaning
up behind itself).
|
|
Having a Unix Domain Socket directly under /tmp is a really bad idea
(think symlink attacks). The standard solution for this is to create a
subdir under /tmp. But since spice-vdagentd runs as root anyways we might
just as well put it in another much safer place. So now the socket is:
/var/run/spice-vdagentd/spice-vdagent-sock
|
|
This makes sure that the daemon cannot be started twice.
|
|
change
|
|
Although ICCCM 2.2. Responsibilities of the Selection Owner:
http://tronche.com/gui/x/icccm/sec-2.html#s-2.2
Clearly states (about selection notify events):
The owner should set the specified selection, target, time, and property
arguments to the values received in the SelectionRequest event.
xsel sets the selection notify event target member to the incr atom when
it is going to send the clipboard data incremental, rather then setting
it to the UTF8_STRING atom (which was the target of the SelectionRequest).
Work around this (esp as it is likely other programs may get this wrong
too) and accept the incr atom as a valid target in a selection notify event.
|
|
This will fail when we are started from the initscripts as there won't be
an active session (yet). Instead get the active session when the first agent
connects (and/or when console kit signals an active session change).
Also fix a copy paste error in GetActiveSession logging.
|
|
Starting from udev rules does not work well as we need /tmp and /var/log
to be writable when spice-vdagentd *and* starting from udev gives selinux
problems when trying to talk to console kit over dbus.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rather the under /sbin where the daemon goes.
|
|
And do not strip the binaries, both changes to make spice-vdagent more
packager friendly.
|
|
For auto starting of the vdagent from gdm and logged in X sessions.
|
|
Without loosing pkgconfig generated cflags for spice-protocol and libdbus
(this patch makes packaging vdagent easier).
|
|
vdagent is a bit of a generic name and thus might create file conflicts,
also just vdagent just not make it clear to the user that vdagent belongs
to spice.
|
|
Rather then breaking from the main_loop, this avoids logging a bogus:
vdagentd quiting, returning status 0
Message to the log file.
|
|
Otherwise GetSessionForUnixProcess will not work.
|
|
cleanly)
|