[PATCH v2][xdm] Implement ConsoleKit support.

Cyril Brulebois kibi at debian.org
Mon Jun 27 12:04:25 PDT 2011


Since ConsoleKit 0.4.2, the sessions created by ck-launch-session are no
longer marked as local and active. This means that distributions can't simply
call ck-launch-session in Xsession.d anymore to get an active local ConsoleKit
session. Instead, XDM must create the session directly, providing info such as
the UID of the user and the tty used to log in (like GDM does).

It's important that locally logged in users get active local ConsoleKit
sessions because that's used by PolicyKit to determine whether certain actions
are allowed or not (according to a set of policies, of course). As an example
of how this can be used, UDisks can automount devices for locally logged in
users without a password prompt with their default PolicyKit policy.

This patch allows XDM to create a ConsoleKit session. This is disabled at
build time by default, you need to enable it with --with-consolekit. It relies
on a very lightweight library called libck-connector (which is distributed
with ConsoleKit) to do the DBus magic required for the creation of the active
local session.

openSUSE bug #528829 <http://bugzilla.novell.com/show_bug.cgi?id=528829>
X.Org bug #17325 <http://bugs.freedesktop.org/show_bug.cgi?id=17325>

Signed-off-by: Takashi Iwai <tiwai at suse.de>
Tested-by: Cyril Brulebois <kibi at debian.org>
Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 configure.ac   |   12 ++++++
 include/dm.h   |    3 ++
 man/xdm.man    |    6 +++
 xdm/resource.c |   13 ++++++-
 xdm/session.c  |  102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 135 insertions(+), 1 deletions(-)


To recap, Takashi Iwai seems to be the author, and also agreed to have the patch
pushed upstream (https://bugzilla.novell.com/show_bug.cgi?id=528829#c3);
Fernando and Stefan “only” passed it on (but feel free to correct that, I can
add your S-o-b). Thanks for passing on the patch anyway! And finally I
made some modifications and tested it, hence the tags.



More information about the xorg-devel mailing list