- Jan 28, 2019
-
-
Lukáš Hrázký authored
The graphics_device_info message contains the device display ID information (device address and device display ID). Stores the data in a hash table in vdagent. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
- Jan 26, 2019
-
-
Frediano Ziglio authored
If test is run with root (for instance on Gitlab CI) creating a file on a directory with no permission will succeed and test will fail. Instead create a link trying to create a file in /proc/1 directory (which fails also using root account). Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Jan 17, 2019
-
-
Commit 098268a3 (systemd: Update path in unit file) was a really incomplete change. Let's change every occurrence of /var/run to /run. Signed-off-by: Christian Hesse <mail@eworm.de> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Jan 16, 2019
-
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
Avoid race condition creating file between checking file existence with stat() and opening with open(). Directly create the file passing the O_EXCL flag. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
Make easier to test file creation Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
Variable is not used. Keep code to create file together. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
Correct invalid value for a file descriptor is -1, not 0. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Jan 15, 2019
-
-
When loading the unit file, systemd 240 logs: systemd[1]: /usr/lib/systemd/system/spice-vdagentd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/spice-vdagentd/spice-vdagentd.pid → /run/spice-vdagentd/spice-vdagentd.pid; please update the unit file accordingly. So update the path. Signed-off-by: Christian Hesse <mail@eworm.de> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Jan 08, 2019
-
-
Christophe Fergeau authored
.socket systemd units already automatically get a Before=sockets.service, and the udev rule we have will ensure that when the appropriate virtio device is there, the socket unit will be started, so this WantedBy dependency is not needed, and is in part responsible for these warnings: [ INFO ] dev-virtio\x2dports-com.redhat.spice.0.device is not active. [DEPEND] Dependency failed for Activation socket for spice guest agent daemon. https://bugzilla.redhat.com/show_bug.cgi?id=1545212 Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
-
Christophe Fergeau authored
The udev rule already adds SYSTEMD_WANTS=spice-vdagentd.socket to the relevant virtio devices, which automatically adds Wants=${device} to spice-vdagentd.socket (see 'systemctl show spice-vdagentd.socket'). Adding a Requisite/After for these ports is at best redundant, and most likely wrong as this is causing boot time warnings: [ INFO ] dev-virtio\x2dports-com.redhat.spice.0.device is not active. [DEPEND] Dependency failed for Activation socket for spice guest agent daemon. https://bugzilla.redhat.com/show_bug.cgi?id=1545212 Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Jan 07, 2019
-
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Jan 04, 2019
-
-
Frediano Ziglio authored
Make sure all module files include config.h Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
Remove HAVE_CONFIG_H check, it is always defined. Remove indentation of includes, now the include is not in a condition and also some were indented some not. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
We need to pass the original argument list, however argv is modified by g_option_context_parse so save a copy of the array to make it possible to restart with the same arguments. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
People can think that 32 means 32 bit while it is always a long. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Frediano Ziglio authored
Different tools (compilers or analysers) recognise missing break in switch as possible problems. Many recognise a "fall through" comment to tell it is wanted. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Jan 03, 2019
-
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
Frediano Ziglio authored
Modify directly the new_wbuf->buf buffer instead of writing into a temporary buffer and then copy in the final one. This also fixes Coverity warning: | uninit_use_in_call: Using uninitialized value "message_header". Field | "message_header.data" is uninitialized when calling "memcpy". Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
- Dec 20, 2018
-
-
Jonathon Jongsma authored
Get the CRTC ID from the output struct rather than using the output_index as an index into the array of crtcs Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
-
- Dec 19, 2018
-
-
Victor Toso authored
In the current code, output should never be negative but the check exists after we use the variable as index. Make the check earlier. This patch also breaks the check in two in order to provide more accurate error log. Found by coverity: | check_after_sink: You might be using variable "output" before | verifying that it is >= 0. Changes in v2: - Move overflow check before accessing the arrays (Frediano) Changes in v3: - Move the whole check before accessing the arrays. - Improve commit log. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Victor Toso authored
And use well defined macros for standard file descriptors. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Dec 15, 2018
-
-
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Nov 16, 2018
-
-
Victor Toso authored
Easier to trigger on Wayland guest by running > xrandr --output XWAYLAND0 --rotate left In current master, this causes the spice-vdagentd to disconnect from the client. In 0.18 branch (latest release), mouse becomes unusable as mentioned in the referred bug below. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1641723 Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Frediano Ziglio authored
The function name is XRRGetScreenSizeRange not RRGetScreenSizeRange. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Frediano Ziglio authored
If connection fails the socket descriptor is not closed causing a leak. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Nov 02, 2018
-
-
Jonathon Jongsma authored
The "Requisite" directive is intended to require that the virtio port device exists before starting the vdagent socket unit. If the device does not exist, the socket should fail to start. However, without using "After", the socket will still start even when the device is not present. The man page for systemd.unit (v239+) says the following about 'Requisite=': "Similar to Requires=. However, if the units listed here are not started already, they will not be started and the starting of this unit will fail immediately. Requisite= does not imply an ordering dependency, even if both units are started in the same transaction. Hence this setting should usually be combined with After=, to ensure this unit is not started before the other unit." See also https://github.com/systemd/systemd/issues/4756 for further details (particularly the following comment: https://github.com/systemd/systemd/issues/4756#issuecomment-267005324 ) Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
-
- Sep 21, 2018
-
-
Jakub Janků authored
Remove @type_to_string, @no_types arguments from udscs_connect(), udscs_create_server{,_for_fd}(). udscs is used only in vdagent.c and vdagentd.c and in both cases the args are the same (vdagentd_messages, VDAGENTD_NO_MESSAGES). Add debug_print_message_header(). Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Sep 19, 2018
-
-
Jakub Janků authored
All command line options now have long names as they are required by GLib. So the supported command line options now are: -h, --help -d, --debug -s, --virtio-serial-port-path -S, --vdagentd-socket -u, --uinput-device -f, --fake-uinput -x, --foreground -o, --one-session -X, --disable-session-integration Change the types of some global variables that hold the options: - const char * --> gchar * - int --> gboolean Define DEFAULT_UINPUT_DEVICE as "/dev/uinput", since there's already DEFAULT_VIRTIO_PORT_PATH, VDAGENTD_SOCKET. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Sep 13, 2018
-
-
It is possible that g_get_user_special_dir() return NULL for G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure thing to happen in case xdg-user-dirs hasn't been run yet. Keeping spice-vdagent to run on Initialization stage of X-GNOME-Autostart-Phase could trigger a race with xdg-user-dirs that also runs on Initialization, which is the earliest stage possible. Moving to spice-vdagent to run WindowManager stage avoids the race with xdg-user-dirs and still runs before any graphical application. Tested also moving to Desktop stage, which is 4th stage (out of 5) and worked without apparent drawbacks. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623947 Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
-
- Sep 07, 2018
-
-
Jakub Janků authored
Move code handling VDAGENTD_FILE_XFER_STATUS messages from agent_read_complete() to a separate function to make the switch statement less cluttered. Simplify the code a bit. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Move code handling VDAGENTD_GUEST_XORG_RESOLUTION messages from agent_read_complete() to a separate function to make the switch statement less cluttered. Remove unnecessary res variable. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
The functions would return -1 only if malloc() failed, otherwise 0. Since malloc() was replaced by g_malloc(), which terminates the program if the allocation fails, return void instead. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
The functions would return -1 only if malloc() failed, otherwise 0. Since malloc() was replaced by g_malloc(), which terminates the program if the allocation fails, return void instead. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Some older parts of the code currently use memory functions defined in stdlib.h and usually handle allocation errors. On the other hand, newer parts of the code and GLib/GTK+ functions themselves commonly use wrappers provided by GLib that terminate the program when there isn't enough memory. So it doesn't make much sense to check for ENOMEM somewhere, while the program can be terminated at any time elsewhere. Unify the code and use GLib wrappers only. malloc --> g_malloc, g_new calloc --> g_malloc0, g_new0 free --> g_free Use g_clear_pointer where possible for simplification. Replace subsequent alloc and memcpy calls with single g_memdup where possible. Note: this commit only partially touches src/vdagent/x11.c as the clipboard-handling code here should be removed in the future. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
Jakub Janků authored
Required GLib version was bumped from 2.28 to 2.34 by 61fc548f. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Aug 28, 2018
-
-
Jakub Janků authored
udscs_get_peer_cred() is currently used only in vdagentd.c to obtain PID, so let's drop udscs_get_peer_cred() and add udscs_get_peer_pid() instead. Acked-by: Victor Toso <victortoso@redhat.com>
-