[Dovecot] cache_key assertion error 1.0.rc15

Frank Cusack fcusack at fcusack.com
Mon Nov 20 19:38:30 UTC 2006

On November 19, 2006 11:59:50 PM -0800 Frank Cusack <fcusack at fcusack.com> 
> On November 19, 2006 8:58:54 PM -0800 Frank Cusack <fcusack at fcusack.com>
> wrote:
>> I just added auth caching with pam, and I'm getting this error:
>> dovecot: [ID 107833 mail.error] auth(default): file passdb.c: line 178
>> (passdb_init): assertion failed: (passdb->passdb->default_pass_scheme !=
>> NULL || passdb->passdb->cache_key == NULL)

Looked into the source and I see that pam doesn't actually implement any
caching.  Also, default_pass_scheme is not initialized (apparently the
cache can store multiple types [schemes] of passwords per key).  So the
example config using a cache_key cannot work.

I started working on implementing this, but I see that in
src/auth/passdb-pam.c:pam_auth(), near the end, the PAM_USER is retrieved
(nice, since PAM allows changing of the username but no one implements
this) and then saved in the auth request with auth_request_set_field().

Now, what is the point of all that?  This code runs in the child forked
to do the PAM auth, and the username is not propagated to the parent
(AFAICT).  And setting this data in the auth request doesn't do anything,
since this code runs in the child.  (Or is the auth request data in
shared memory?  Doesn't look like it.)

I didn't want to continue with my work if I had a misunderstanding of
how to set the cache data.


More information about the dovecot mailing list