This series is about drag-and-drop in locked session. The issue itself is a bit of a corner case which could allow a 'malicious' user to copy files to the ~/Download folder of the user that is logged but with a locked session. I found this as a good opportunity to work a bit on the integration with systemd-logind and console-kit. My tests are around GNOME under rhel6[0] (console-kit) and rhel7[1] (logind). [0] rhel6: https://bugzilla.redhat.com/show_bug.cgi?id=1323630 [1] rhel7: https://bugzilla.redhat.com/show_bug.cgi?id=1323623 This series is using the dbus api from console-kit and logind to track the proper signals such as 'Lock' and 'Unlock' to give the agent the status of session. For upstream and rhel7 we still need a fix in another component that should do the Lock/Unlock using the systemd-logind functions. This seems to be expected by systems that rely on logind so it should not be a problem. In GNOME3, it was suggested to address it in gnome-shell. Bug is: https://bugzilla.gnome.org/show_bug.cgi?id=764773 Like upstream/rhel7, systems that rely on console-kit must trigger its Lock/Unlock signals. Another signal that seems interesting to track is the IndleHintChanged. On my tests in rhel6, Lock/Unlock was not triggered (which is probably a bug somewhere that I have no filed yet) but the IdleHintChanged worked well. I also did some small clean-up in the console-kit, I hope it looks fine :) ** log from rhel6/rhel7 when drag-and-drop on locked session: <spice-vdagentd> spice-vdagentd[665]: Session is locked, skipping file-xfer-start spice-vdagentd[665]: User's session is locked and cannot start file transfer. Cancelling client file-xfer request 4 spice-vdagentd[665]: Session is locked, skipping file-xfer-start spice-vdagentd[665]: User's session is locked and cannot start file transfer. Cancelling client file-xfer request 5 </spice-vdagentd> ** on logind systems you can check for the session you are running with command [2] and trigger the Lock with command [3]. You can monitor all signals with [4] ;) [2] dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.ListSessions" [3] (object path of my session is this _34 one) gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1/session/_34 --method org.freedesktop.login1.Session.Lock [4] gdbus monitor --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1/session/_34 Cheers, toso Victor Toso (8): session-info: introduce session_is_locked method build-sys: console-kit with dbus as default console-kit: use define for dbus paths console-kit: use standard name for session-info var console-kit: save verbosity level for debugging console-kit: include signal handler function console-kit: include handler for dbus match console-kit: implement session_is_locked configure.ac | 17 +-- src/console-kit.c | 350 +++++++++++++++++++++++++++++++++-------------- src/dummy-session-info.c | 5 + src/session-info.h | 3 + src/systemd-login.c | 119 ++++++++++++++++ src/vdagentd.c | 7 + 6 files changed, 382 insertions(+), 119 deletions(-) -- 2.5.5 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel