[PATCH] a library and, uh, a PAM module

David Zeuthen david at fubar.dk
Wed Feb 28 13:01:49 PST 2007


On Wed, 2007-02-28 at 14:35 -0500, William Jon McCann wrote:
> 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?

Looks much better, thanks.

> 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.

Yeah. I was think perhaps some types needs to be prefixed with linux_vt_
so our grandkids know what to change when Linux desktops are switching
away from Linux VT's to a user space console setup.

> 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?

Perhaps. I don't think it makes a difference; the man page clearly
states one has to be careful if you're using this module...

> > 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.

I'll look at cleaning this up.

Thanks!

     David




More information about the hal mailing list