Age | Commit message (Collapse) | Author | Files | Lines |
|
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Regular headers file should be listed in SOURCES
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Makes the makefile more readable and easy to change in the next few
commits.
Based on Marc-André Lureau patch.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
Property introduced in v230 of systemd.
Systems that don't have up to date systemd-login will get the
following log message:
"Properties.Get failed (locked-hint) due Unknown property or interface."
Resolves: rhbz#1323623
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
Implementing the function that was introduced in previous commit:
session_info_is_user()
In console-kit we can gather the session type with GetSessionType api
from Session interface. This function is not well documented but seems
reliable enough as GDM was using it [0]
[0] session_is_login_window on gui/simple-greeter/gdm-user-manager.c
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1323640
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
session-info back-ends such as console-kit and systemd-login have the
concept of session's class which informs if session belongs to user or
not [0]. We can disable features based on the session class.
[0] Display-Managers are 'Greeter' and Display lock screens are
'lock-screen'
This patch introduces session_info_is_user() and disable file-xfer in
case agent's session does not belong to the 'user' class. As the
session-info data is hold by vdagentd, this patch also introduces
VDAGENTD_FILE_XFER_DISABLE message to disable file-xfer that is done
in vdagent.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1328761
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
We register to read the Lock, Unlock and IdleHintChanged signals from
ConsoleKit.Session. The Lock/Unlock signals should be the right
signals for the job but not all Desktop Managers implement its locking
in a way that trigger those signals. That's why we double-check with
IdleHintChanged signal that it might be triggered by other services
like screen savers.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Each session back-end can return this information to vdagentd when
requested.
The agent should use this on situations that should not work when
session is locked such as file-transfer-start which is fixed by this
patch.
systemd-login is the only back-end implementing this function at the
moment and I'll address console-kit back-end in a later patch.
Also, this patch makes spice-vdagent depend on dbus for getting the
lock information.
Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1323623
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Introduced recently by b1b8b71961b9a28cc4896e9973d3a3c1975ead39
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Instead of treating them as errors.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Change cancel_file_xfer() helper function to file_xfer_status() so we
can send other status to the client.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
At the moment we request to read signals on ConsoleKit.Seat interface
but later on we will request to read signals on different interface so
moving this to its own function helps.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
At the moment we are only reading the ActiveSessionChanged signal from
ConsoleKit.Seat but in a later patch we will be reading a few more
signals so it make sense to move this handler to its own function.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
DBus might return empty string for active-session, probably in a non
user session (e.g. gdm). It is better to keep the variable as NULL as
we check against that (but never against empty strings).
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Console-kit was the first back-end implement to gather session info.
When systemd integration was implemented with logind, we introduced
session-info struct to deal with different back-ends.
The 'ck' var was not changed at the time but it seems right to do so.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
This improves readability of all paths related to dbus methods. This
patch only applies for interfaces and object paths, later one it is
included for signals as well.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Acked-by: Pavel Grunt <pgrunt@redhat.com>
|
|
Removing glib-compat header as it isn't used anymore.
|
|
Since systemd 209, the various systemd helper libraries are gathered in
a single libsystemd, and libsystemd-login is only built when systemd is
built with compat libraries support. Since commit
https://github.com/systemd/systemd/commit/4de282c
"build-sys: drop libsystemd-{id128,daemon,login,journal}.so compat libs"
(2016-02-12), these compat libraries are no longer available.
This commit checks for both libsystemd and libsystemd-login to ensure we
can build on both older and newer systemd versions.
https://bugs.freedesktop.org/show_bug.cgi?id=94209
|
|
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
vdagent only needs the client-side API.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
To do so define UDSCS_NO_SERVER.
This simplifies reuse in client-only scenarios that don't need peer
credential support for instance.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
This will simplify selectively disabling the server-side code.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
VDP_LAST_PORT is equal to VDP_SERVER_PORT while VDP_END_PORT (defined
in spice-protocol) is VDP_SERVER_PORT + 1 so the code needs to be
adjusted to account for this difference.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
The vdagent process currently exits with an error code set to 0 whenn
the virtio device cannot be opened (for example because it's missing).
This is not consistent with the other failures to startup which set the
exit code to 1. This commit ensures 1 is returned in this situation too.
Resolves: rhbz#1256704
|
|
This correctly fixes the leak from reverted patch
4835df0b642dfc963e7
==2648== HEAP SUMMARY:
==2648== in use at exit: 104,699 bytes in 1,459 blocks
==2648== total heap usage: 14,177 allocs, 12,718 frees, 1,190,456 bytes allocated
==2648==
==2648== 16 bytes in 1 blocks are definitely lost in loss record 16 of 130
==2648== at 0x4C29BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2648== by 0x10B530: agent_read_complete (vdagentd.c:715)
==2648== by 0x10E8DC: udscs_read_complete (udscs.c:460)
==2648== by 0x10EAFC: udscs_do_read (udscs.c:515)
==2648== by 0x10E490: udscs_client_handle_fds (udscs.c:349)
==2648== by 0x10E402: udscs_server_handle_fds (udscs.c:337)
==2648== by 0x10BAB1: main_loop (vdagentd.c:844)
==2648== by 0x10A3E6: main (vdagentd.c:974)
==2648==
==2648== LEAK SUMMARY:
==2648== definitely lost: 16 bytes in 1 blocks
==2648== indirectly lost: 0 bytes in 0 blocks
==2648== possibly lost: 41,483 bytes in 1,268 blocks
==2648== still reachable: 63,200 bytes in 190 blocks
==2648== suppressed: 0 bytes in 0 blocks
==2648== Reachable blocks (those to which a pointer was found) are not shown.
==2648== To see them, rerun with: --leak-check=full --show-leak-kinds=all
|
|
This reverts commit 4835df0b642dfc963e7cbaabfe93da86482f0b93.
uinput only holds reference to screen_info and should not free it.
The leak should be fixed somewhere else.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1262635
|
|
|
|
Compilation breaks with older gcc versions (gcc (GCC) 4.4.7 20120313
(Red Hat 4.4.7-11) on RHEL6) with the following error (due to the
additional use of -Werror in the default CFLAGS)
CC src/src_spice_vdagent-vdagent-x11-randr.o
cc1: warnings being treated as errors
src/vdagent-x11-randr.c: In function ‘vdagent_x11_randr_handle_event’:
src/vdagent-x11-randr.c:499: error: dereferencing pointer ‘sce’ does break strict-aliasing rules
src/vdagent-x11-randr.c:499: error: dereferencing pointer ‘sce’ does break strict-aliasing rules
src/vdagent-x11-randr.c:498: note: initialized from here
make: *** [src/src_spice_vdagent-vdagent-x11-randr.o] Error 1
Strict aliasing is not something we must have for the agent, and the
alternative would most likely involve an anonymous union, or some
casting. Given that this warning only occurs with these older compilers,
better to go with a fix as non-invasive as possible.
Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=90981
|
|
Added by commits: 251637aa23 and 1c25f882a
|
|
spice-protocol newer than 0.12.7 is needed for the volume
synchronization bits.
|
|
Avoids a crash when running spice-vdagent with debug
Backtrace:
#0 0x0000003dcf647e2c in _IO_vfprintf_internal (s=<value optimized out>, format=<value optimized out>, ap=<value optimized out>) at vfprintf.c:1641
#1 0x0000003dcf6e4e90 in __vsyslog_chk (pri=<value optimized out>, flag=-1, fmt=0x40f360 "%p received %s, arg1: %u, arg2: %u, size %u", ap=0x7fffffffddc0) at ../misc/syslog.c:222
#2 0x0000003dcf6e50c0 in __syslog (pri=<value optimized out>, fmt=<value optimized out>) at ../misc/syslog.c:119
#3 0x000000000040c6da in udscs_read_complete (connp=0x610de8) at src/udscs.c:448
#4 0x000000000040c8d1 in udscs_do_read (connp=0x610de8) at src/udscs.c:500
#5 0x000000000040c303 in udscs_client_handle_fds (connp=0x610de8, readfds=0x7fffffffe0a0, writefds=0x7fffffffe020) at src/udscs.c:349
#6 0x0000000000403d74 in main (argc=3, argv=0x7fffffffe248) at src/vdagent.c:365
|
|
Include the capability of volume sync to set volume or mute to default
sink-input/source-output of guest.
|
|
This patch includes the vdagent-audio.[ch] files in order to
communicate with backend audio server.
The two functions provide a way to set volume and mute in the guest
by connecting to default mixer control in alsa which is 'Master' for
playback and 'Capture' for record.
|
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1086657
|
|
Make sure vdagent follows the current monitor configuration. This
solves a number of issue where the pointer input is off, because the
uinput tablet isn't reconfigured.
https://bugzilla.redhat.com/show_bug.cgi?id=1086657
|
|
GNOME will restore monitors.xml configuration whenever the timestamp
"config > change". The "change" timestamp is the last user applied
configuration, whereas the "config" timestamp is updated when
the screen is updated or ouput/crtc modes are added/removed.
These condition are triggered by vdagent during monitor config. Since we
can't control the timestamps (playing with delay will be inherently
event more racy), the only sane way I can think of is to disable gsd
behaviour. This can be achieved by deleting the ~/.config/monitors.xml,
which is the intended configuration to restore, so vdagent will override
whatever configuration was saved previously.
Somehow, if vdagent would be better integrated with gnome2, it would use
the gnome-rr and/or org.gnome.SettingsDaemon.XRANDR dbus
API. Thanksfully, in gnome3, the monitor auto-configuration has been
merged in.
https://bugzilla.redhat.com/show_bug.cgi?id=1086657
|
|
This is needed on 32 bit machines for drag and drop of large files (>2GB
to work). This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1206663
|
|
Since previous commit, vdagent_x11_set_monitor_config() will return
early if 'curr' is NULL so we don't need to explicitly check its value.
Issue reported by the Coverity checker.
|
|
get_current_mon_config() can return NULL, but
vdagent_x11_set_monitor_config() was calling it without checking if it's
NULL before dereferencing it.
This issue was pinpointed by Coverity.
|
|
The following leak is fixed by this patch:
==2648== HEAP SUMMARY:
==2648== in use at exit: 104,699 bytes in 1,459 blocks
==2648== total heap usage: 14,177 allocs, 12,718 frees, 1,190,456 bytes allocated
==2648==
==2648== 16 bytes in 1 blocks are definitely lost in loss record 16 of 130
==2648== at 0x4C29BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2648== by 0x10B530: agent_read_complete (vdagentd.c:715)
==2648== by 0x10E8DC: udscs_read_complete (udscs.c:460)
==2648== by 0x10EAFC: udscs_do_read (udscs.c:515)
==2648== by 0x10E490: udscs_client_handle_fds (udscs.c:349)
==2648== by 0x10E402: udscs_server_handle_fds (udscs.c:337)
==2648== by 0x10BAB1: main_loop (vdagentd.c:844)
==2648== by 0x10A3E6: main (vdagentd.c:974)
==2648==
==2648== LEAK SUMMARY:
==2648== definitely lost: 16 bytes in 1 blocks
==2648== indirectly lost: 0 bytes in 0 blocks
==2648== possibly lost: 41,483 bytes in 1,268 blocks
==2648== still reachable: 63,200 bytes in 190 blocks
==2648== suppressed: 0 bytes in 0 blocks
==2648== Reachable blocks (those to which a pointer was found) are not shown.
==2648== To see them, rerun with: --leak-check=full --show-leak-kinds=all
|
|
transferred
Once transferring multiple files is supported, do not bother the user
opening the file transfer directory for each file transferred, just do it
when the last file transfer is finished.
|
|
This commit sends back a VD_AGENT_FILE_XFER_STATUS_ERROR to clients which
try to transfer files when the agent disabled file transfers (for example
because there is no valid destination directory for the transferred files).
|
|
Currently, if no suitable destination directory can be found, the file
transfer code defaults to using '.' as the destination directory. As this
is unlikely to work, better to just disable file transfers when we end up
in such a situation. This currently happens when spawning spice-vdagent
from gdm where we don't want file transfers to be available anyway.
|
|
This commit only adds if (vdagent_file_xfers != NULL) {} checks before
calling into the file transfer code. This allows to disable file transfer
handling by setting this variable to NULL.
|
|
With the next commit, we won't always have a file xfer object available.
This next commit will make sure NULL is never passed to the public file
xfer functions, but it's safer to guard against that anyway in case
this gets broken in the future.
|