ConsoleKit update

William Jon McCann mccann at jhu.edu
Mon Mar 5 22:34:13 PST 2007


Hi,

I've landed quite a few changes recently and I'd like to get some
feedback.  Some changes include:

  * OpenSession() now uses an async helper process to collect session
info that can be trusted.  It seems to work pretty well.  You can test
it by using the src/test-open-session script and then look at the
output of ck-list-sessions

  * I've added a separate x11-display-device property to the session
interface.  This solves a number of problems.  It is particularly
important when a session leader has both a valid display-device and
x11-display-device.  It should also help avoid PAM_TTY type problems.
I'll write up some more on this later.

  * I've renamed the host-name attribute to remote-host-name.  I think
this makes it obvious what it should be used for.  It is also closer
to the PAM_RHOST item definition.  This also avoids the problem of
what to call the local system (ie. localhost, localhost.localdomain,
hostname, FQDN, 127.0.0.1, etc).

 * Added a ck_connector_open_session_with_parameters function.  So,
applications that use the connector may set arbitrary properties on a
new session.  This also makes it easier to support more optional
parameters from the PAM module.

  * Added PAM_RHOST support to PAM module.  I was hoping that this
would allow the PAM module to be used for SSH logins.  More on that
later (doesn't work too well).

  * Now that OpenSession() is basically complete we need to allow for
the possibility that the static seat can have more than one match when
a VT activates.  I've added support for this.  I think the rule I used
is adequate:
     1. take the oldest session where display-device == active VT device
     2. take the oldest session where x11-display-device == active VT device

 * Modified the rules for which sessions are added to the "static"
Seat1.  It used to group everything that was marked as local.
However, that really isn't a very good way to do it for a number of
reasons.  So I've changed it to:

        if (x11_display != NULL
            && x11_display_device != NULL
            && remote_host_name == NULL
            && is_local == TRUE) {
                is_static_x11 = TRUE;
        } else if (x11_display == NULL
                   && x11_display_device == NULL
                   && display_device != NULL
                   && remote_host_name == NULL
                   && is_local == TRUE) {
                is_static_text = TRUE;
        }

        if (is_static_x11 || is_static_text) {
          /* add to Seat1 */
        }


TODO:

  * Patch GDM for changes
    http://bugzilla.gnome.org/show_bug.cgi?id=415181
 * Write documentation (particularly for attributes)
    Will try to get this done in the next few days
 * Make ssh sessions work correctly
    Not as easy as just using the PAM module.
 * Figure out how to register activation handlers
 * Use a configuration file for defining how to add sessions to seats

I'd like to do another release in the next few days and then hopefully
stabilize for the HAL and GNOME releases.

Thoughts?

Thanks,
Jon


More information about the hal mailing list