Package: accountsservice
Version: 0.6.9-1
Severity: wishlist

Hi,

the ck_history code, having been moved from GDM to accountsservice,
comes with the bugs it already had.

The ConsoleKit session type parameter is not clearly defined upstream.
AFAIK, its sole user is GDM. For the login session, which is not a real
session, it sets the type to 'LoginWindow'. For regular sessions, it
sets the type to '' (the default), so this is the same as TTY or SSH
connections.

GDM then uses this database to generate a list of frequent users. But
the way it is written, it accounts for all users, including those that
might never log with X11, such as a remote user or a sysadmin. It is
very wrong to display all of them.

In squeeze, this was fixed by making GDM use 'gdm' as session type for
regular sessions. However, since this code has been moved to
accountsservice, this doesn’t work at all anymore. Furthermore, the API
doesn’t allow to query the history for a specific session type.

Therefore I’m proposing to fix it differently: 
      * have accountsservice filter by 'x11' session type; 
      * make GDM use that 'x11' session type instead of 'gdm'; 
      * request other display managers (such as slim or kdm) to use the
        same session type.
This way I feel we have a double-win: users are filtered correctly, and
they still are regardless of the login manager.

I’m attaching the needed change in accountsservice. Without another
solution, I consider it as a prerequisite to uploading gdm3 3.x.

Thanks,
-- 
 .''`.      Josselin Mouette
: :' :
`. `'  “If you behave this way because you are blackmailed by someone,
  `-    […] I will see what I can do for you.”  -- Jörg Schilling

Index: accountsservice/src/daemon.c
===================================================================
--- accountsservice.orig/src/daemon.c	2011-04-28 19:12:31.452838301 +0200
+++ accountsservice/src/daemon.c	2011-04-28 19:14:46.413498112 +0200
@@ -418,7 +418,7 @@ reload_ck_history (Daemon *daemon)
         gint standard_out;
         GIOChannel *channel;
 
-        command = g_strdup ("ck-history --frequent --session-type=''");
+        command = g_strdup ("ck-history --frequent --session-type='x11'");
         g_debug ("running '%s'", command);
         error = NULL;
         if (! g_shell_parse_argv (command, NULL, &argv, &error)) {

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to