summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-01README: Add qemu commandline options for vdagentHEADmasterChristophe Fergeau1-0/+17
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.
2011-03-30vdagent-x11: Add support for incr. sending of clipboard data (rhbz#690164)Hans de Goede1-16/+117
2011-03-30vdagent-x11: ensure no events are pending before returning to the main loopHans de Goede1-12/+31
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.
2011-03-29vdagent-x11: Release clipboard on exitHans de Goede1-0/+3
2011-03-29vdagent-x11: Fix typo in commentHans de Goede1-1/+1
2011-03-29vdagent-x11: add vdagent_x11_next_selection_request helperHans de Goede1-8/+10
2011-03-28udscs: Let the read call back take owner ship of the dataHans de Goede6-6/+16
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.
2011-03-28vdagent-x11: Only move to next element in selection queue on process_next_reqHans de Goede1-5/+11
2011-03-28vdagent-x11: Fix indentationHans de Goede1-5/+5
2011-03-23vdagent-virtio-port: properly demultiplex vdagent messages per portHans de Goede1-24/+44
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.
2011-03-23vdagent-virtio-port: don't pass the chunk header, only the chunk port nrHans de Goede3-4/+4
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.
2011-03-23vdagent-virtio-port: rename port parameter to vportHans de Goede3-120/+120
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.
2011-03-23vdagentd: fix potentially copying more data then a chunk holds when reading ↵Hans de Goede1-0/+3
the header
2011-03-17vdagent: Add daemonizing support, daemonize by defaultHans de Goede1-11/+49
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.
2011-03-17vdagentd: Fix a gcc 4.6 warningHans de Goede1-1/+1
2011-03-17vdagentd: Don't open virtio port if creating uinput failsHans de Goede1-0/+1
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.
2011-03-17vdagentd: Modprobe uinput from spice-vdagentd.sh initscript (rhbz#688257)Hans de Goede1-0/+1
uinput may be a module and it does not autoload properly on all systems
2011-03-17vdagentd: Fix closing of logfile in error exit pathsHans de Goede1-0/+6
2011-03-17vdagentd: Fix exit value on fork failureHans de Goede1-1/+1
2011-03-07Allow changing the resolution through the agent on multi monitor setupsHans de Goede1-2/+1
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.
2011-01-10sysv initscript: exit cleanly when not running under spiceHans de Goede1-1/+1
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.
2010-11-19Put the pid and log files into their own subdirHans de Goede3-5/+8
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.
2010-11-08sysv initscript: fix lsb header multi line descriptionHans de Goede1-2/+2
2010-11-01Only start spice-vdagentd in runlevel 5Hans de Goede1-2/+2
Having it in runlevels without X is not useful
2010-11-01Install spice-vdagentd in /usr/sbin not /sbinHans de Goede2-2/+2
Now that it is no longer launched by a udev rule it does not need to be in /sbin.
2010-11-01Update .gitignoreHans de Goede1-2/+2
2010-11-01udscs: fix client linked list corruptionHans de Goede1-0/+2
2010-11-01Makefile: create dir for vdagentd socketHans de Goede1-0/+2
2010-11-01initscript: remove socket before starting the daemonHans de Goede1-0/+2
This is necessary if the previous daemon crashed (exited without cleaning up behind itself).
2010-11-01vdagentd: change socket nameHans de Goede1-1/+1
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
2010-11-01vdagentd: unlink socket on exit rather then startupHans de Goede2-8/+2
This makes sure that the daemon cannot be started twice.
2010-11-01vdagent-x11: clear pending client clipboard request on clipboard ownership ↵Hans de Goede1-9/+15
change
2010-11-01vdagentd-x11: Work around a bug in xselHans de Goede1-1/+2
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.
2010-10-31vdagentd: Do not try to get active session on startupHans de Goede2-20/+7
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.
2010-10-31Switch to a sysv init script for starting spice-vdagentdHans de Goede4-5/+121
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.
2010-10-31Fixup desktop file for autostartHans de Goede1-1/+3
2010-10-31vdagentd: Fix compiler warningHans de Goede1-1/+3
2010-10-30Add COPYING (GPLv3 license text)Hans de Goede1-0/+674
2010-10-30Add a ChangeLog fileHans de Goede1-0/+5
2010-10-30Add archive Makefile targetHans de Goede1-0/+11
2010-10-30vdagentd: only realloc capabilities array if size changesHans de Goede2-9/+11
2010-10-30Update READMEHans de Goede2-8/+22
2010-10-30Install spice-vdagent under /usr/binHans de Goede1-1/+4
Rather the under /sbin where the daemon goes.
2010-10-30Keep timestamps when installing filesHans de Goede1-2/+2
And do not strip the binaries, both changes to make spice-vdagent more packager friendly.
2010-10-30Add a vdagent-spice.desktop fileHans de Goede3-0/+16
For auto starting of the vdagent from gdm and logged in X sessions.
2010-10-30Allow overriding CFLAGSHans de Goede1-5/+4
Without loosing pkgconfig generated cflags for spice-protocol and libdbus (this patch makes packaging vdagent easier).
2010-10-30Rename user visible files from vdagent* to spice-vdagent*Hans de Goede5-8/+8
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.
2010-10-29vdagentd: When daemonizing use exit() from the motherHans de Goede1-1/+4
Rather then breaking from the main_loop, this avoids logging a bogus: vdagentd quiting, returning status 0 Message to the log file.
2010-10-29vdagentd: connect to console kit after daemonizeHans de Goede1-3/+3
Otherwise GetSessionForUnixProcess will not work.
2010-10-29vdagent: catch quit / int signals and make them quit the main loop (iow exit ↵Hans de Goede1-1/+17
cleanly)