session-info: check if session belongs to user
commit4c0e9c965e059ba2b884e66f0402e061a9d886a6
authorVictor Toso <victortoso@redhat.com>
Thu, 21 Apr 2016 08:32:50 +0000 (21 10:32 +0200)
committerVictor Toso <victortoso@redhat.com>
Wed, 4 May 2016 07:23:32 +0000 (4 09:23 +0200)
tree1ba6c74defaf2910761b1958974bbe9e07cfac3f
parent1700c0244f37dc67a48519765543ddd7c3f4c17b
session-info: check if session belongs to user

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>
src/console-kit.c
src/dummy-session-info.c
src/session-info.h
src/systemd-login.c
src/vdagent.c
src/vdagentd-proto-strings.h
src/vdagentd-proto.h
src/vdagentd.c