[PATCH] a library and, uh, a PAM module
William Jon McCann
mccann at jhu.edu
Wed Feb 28 11:35:56 PST 2007
Hey David,
On 2/28/07, David Zeuthen <david at fubar.dk> wrote:
>
> Hey,
>
> Here are some patches to add one library and one PAM module so other
> programs (apart from gdm) can easily interact with ConsoleKit. It's
> mainly going to be used, I think, by login(1) and xinit(1). I'm not
> super happy about doing a PAM module but the Fedora util-linux package
> maintainer seems to be insist on this instead of just patching login(1).
> The PAM module isn't built by default. Both pieces of code are licensed
> under the MIT license as god knows what might want to use them. Sounds
> good to you?
Yeah, looks good. There were a few little things I didn't like about
the API though. So, I applied your patches and then patched over them
to make this:
http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=blob;hb=HEAD;f=libck-connector/ck-connector.h
http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=blob;hb=HEAD;f=libck-connector/ck-connector.c
And I moved your example code into:
http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=blob;hb=HEAD;f=libck-connector/test-connector.c
How does this API look to you?
At some point it might be nice to add a true
open_session_with_parameters function to the connector so that we can
just use this in GDM too. However, it is a bit tricky to have a
simple but complete API for variablely typed varargs.
One question about the pam module. Back when I wrote
pam-console-manager I used pam_{get,set}_data to pass data between
sm_open_session and sm_close_session. Maybe it is better to do that
than to store the pointer as a module wide variable?
> Also, in HAL I have a small library for tracking CK seats and sessions
> including caching this for quick look ups (avoiding IPC), see
>
> http://gitweb.freedesktop.org/?p=hal.git;a=blob;hb=HEAD;f=hald/ck-tracker.h
> http://gitweb.freedesktop.org/?p=hal.git;a=blob;hb=HEAD;f=hald/ck-tracker.c
>
> Perhaps this would be useful to have in ConsoleKit as well?
Yeah, probably.
Thanks for the patches!
Jon
More information about the hal
mailing list