[PATCH] CK verify parameters + xinit patch

David Zeuthen david at fubar.dk
Sun Apr 1 21:01:22 PDT 2007


Hey,

Here's a rough patch for making the method OpenSessionWithParameters()
verify the passed parameters. With this we can lift the restriction that
only uid 0 can call into it. This is needed to make startx(1) work
insofar that xinit(1) can be patched to call OpenSessionWithParameters()
such that a new session object is created.

Attached are patches against CK master and xinit 1.0.2 - with these,
startx(1) "just works"; see [1] for the output of ck-list-consoles.

So I'm not completely happy with the patch; it introduces a bunch of
duplication between OpenSession() and OpenSessionWithParameters() and it
also right now ignores the remote case for unprivileged users (though I
believe that is easy to fix). In fact... I have a hard time figuring out
when OpenSession() is used so I thought, several times, about just
deleting it - at least that's one way of dealing with duplication :-).
Maybe I'm missing something?

Anyway, please review. Thanks.

     David

[1] : this is the user 'bateman' logged in on VT1 and then running
'startx -- :1'

Session19:
        uid = '501'
        realname = 'Patrick Bateman'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2007-04-02T03:57:41Z'
Session21:
        uid = '501'
        realname = 'Patrick Bateman'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ':1'
        x11-display-device = '/dev/tty8'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2007-04-02T03:57:52Z'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xinit-1.0.2-poke-ck.patch
Type: text/x-patch
Size: 5166 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070402/d6fca14f/xinit-1.0.2-poke-ck-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConsoleKit-0.2.1-verify-params.patch
Type: text/x-patch
Size: 20063 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070402/d6fca14f/ConsoleKit-0.2.1-verify-params-0001.bin


More information about the hal mailing list