Comment 8 for bug 476811

Revision history for this message
Veli-Matti Lintu (vmlintu) wrote :

I had got hit by this bug also and after digging the code it looks like there are two separate issues. In comment #7 the problem is probably this:

gui/simple-greeter/gdm-user-manager.c

static gboolean
parse_ck_history_line (const char *line,
                       char **user_namep,
                       gulong *frequencyp)
{
...
        re = g_regex_new ("(?P<username>[0-9a-zA-Z]+)[ ]+(?P<frequency>[0-9]+)", 0, 0, &error);
...
}

The regex allows only numbers 0-9 and letters a-z either downcase or uppercase. We have a lot of usernames with dashes and commas, so the regex breaks here.

The bigger problem is the 8 character limit that comes from consolekit as described in comment #2. I didn't feel like patching consolekit as it might affect quite a few other places, so I made a quick hack to make Include= accept script name like AutomaticLogin= does with pipe in the end. The patch checks if the value ends in | and executes it as script if it does. The output of the script is then used to create the userlist. The output should be formatted as username1,username2,username3,etc..

This is used as a temporary solution until we get something permanent done. With this solution both the 8 character limit of ck-history and the regex problem are avoided. As a bonus we can code the filtering logic ourselves.