Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Timo Sirainen
On Oct 23, 2008, at 9:15 PM, Sascha Wilde wrote: as lib-auth/auth-client.c already exists. Would it be a good idea to put the new stuff in the same file? And in case not, any suggestions what a new file could be named? Hmm. auth-client.c is about performing authentication as a client. What

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Sascha Wilde <[EMAIL PROTECTED]> writes: > Timo Sirainen <[EMAIL PROTECTED]> writes: >> On Thu, 2008-10-23 at 16:18 +0200, Sascha Wilde wrote: > [...] >>> 2.) The exported interface in the respective auth-client.h files is >>> different. The solution would be to figure out what the right >>>

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Thu, 2008-10-23 at 18:55 +0200, Sascha Wilde wrote: >> Timo Sirainen <[EMAIL PROTECTED]> writes: >> > On Thu, 2008-10-23 at 13:13 +0200, Sascha Wilde wrote: >> >> Timo Sirainen <[EMAIL PROTECTED]> writes: >> >> > On Oct 21, 2008, at 5:27 PM, Sascha Wil

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Timo Sirainen
On Thu, 2008-10-23 at 18:55 +0200, Sascha Wilde wrote: > Timo Sirainen <[EMAIL PROTECTED]> writes: > > On Thu, 2008-10-23 at 13:13 +0200, Sascha Wilde wrote: > >> Timo Sirainen <[EMAIL PROTECTED]> writes: > >> > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: > >> >> Sascha Wilde <[EMAIL PROTECTED

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Thu, 2008-10-23 at 16:18 +0200, Sascha Wilde wrote: [...] >> 2.) The exported interface in the respective auth-client.h files is >> different. The solution would be to figure out what the right >> interface would be [...] > Perhaps something l

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Thu, 2008-10-23 at 13:13 +0200, Sascha Wilde wrote: >> Timo Sirainen <[EMAIL PROTECTED]> writes: >> > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: >> >> Sascha Wilde <[EMAIL PROTECTED]> writes: >> >>> [userdb-checkpassword] >> [...] >> > The code i

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Timo Sirainen
On Thu, 2008-10-23 at 16:18 +0200, Sascha Wilde wrote: > 1.) It seems that some code in deliver/auth-client.c has been revised > after it was copied to expire/auth-client.c, this is a small problem > as I would expect simply using the newer code to be the right > thing[tm]. Yes, I have

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Timo Sirainen
On Thu, 2008-10-23 at 13:13 +0200, Sascha Wilde wrote: > Timo Sirainen <[EMAIL PROTECTED]> writes: > > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: > >> Sascha Wilde <[EMAIL PROTECTED]> writes: > >>> [userdb-checkpassword] > [...] > > The code is now in dovecot-1.2 tree. > > Unfortunately ther

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Sascha Wilde <[EMAIL PROTECTED]> writes: > Timo Sirainen <[EMAIL PROTECTED]> writes: >> On Wed, 2008-10-22 at 16:15 +0200, Sascha Wilde wrote: >>> There are more than 250LOC in deliver/auth-client.c and I wonder if >>> there is already a higher level api for auth clients? I would have >>> expected

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: >> Sascha Wilde <[EMAIL PROTECTED]> writes: >>> [userdb-checkpassword] [...] > The code is now in dovecot-1.2 tree. Unfortunately there is one tiny, but essential change missing: diff -r afdc27e0b665 src/

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-23 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Wed, 2008-10-22 at 16:15 +0200, Sascha Wilde wrote: >> Timo Sirainen <[EMAIL PROTECTED]> writes: >> > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: >> >> Sascha Wilde <[EMAIL PROTECTED]> writes: >> >>> [userdb-checkpassword] >> >> > The code is now

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-22 Thread Timo Sirainen
On Wed, 2008-10-22 at 16:15 +0200, Sascha Wilde wrote: > Timo Sirainen <[EMAIL PROTECTED]> writes: > > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: > >> Sascha Wilde <[EMAIL PROTECTED]> writes: > >>> [userdb-checkpassword] > > > The code is now in dovecot-1.2 tree. > > Thank you, that's great

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-22 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: >> Sascha Wilde <[EMAIL PROTECTED]> writes: >>> [userdb-checkpassword] > The code is now in dovecot-1.2 tree. Thank you, that's great! The only thing I'm missing is the addition to the example.conf I mad

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-21 Thread Timo Sirainen
On Oct 21, 2008, at 5:27 PM, Sascha Wilde wrote: Sascha Wilde <[EMAIL PROTECTED]> writes: Timo Sirainen <[EMAIL PROTECTED]> writes: [...] All of this forces that the checkpassword script developer either handles the AUTHORIZED environment correctly or it doesn't work at all. And it prevents a

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-21 Thread Sascha Wilde
Sascha Wilde <[EMAIL PROTECTED]> writes: > Timo Sirainen <[EMAIL PROTECTED]> writes: > [...] >> All of this forces that the checkpassword script developer either >> handles the AUTHORIZED environment correctly or it doesn't work at >> all. And it prevents admin from accidentally using the script w

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Timo Sirainen
On Oct 20, 2008, at 10:40 PM, Timo Sirainen wrote: Ever since I took these Human-Computer-Interfacing classes I've started thinking about ways to make things more easier (and foolproof). There was this one example about how difficult it was to design a web page (about 10 years ago) that tol

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Timo Sirainen
On Oct 20, 2008, at 10:19 PM, Sascha Wilde wrote: Ok, you convinced me that your concept has the advantage of forcing the checkpassword script author to try to implement all aspects of the spec. .. After all, nothing is foolproof to a sufficiently talented fool. ;-) Sure, but I like it be

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: [...] > All of this forces that the checkpassword script developer either > handles the AUTHORIZED environment correctly or it doesn't work at > all. And it prevents admin from accidentally using the script wrong. Ok, you convinced me that your concept has

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Timo Sirainen
On Oct 20, 2008, at 8:57 PM, Sascha Wilde wrote: Timo Sirainen <[EMAIL PROTECTED]> writes: On Oct 20, 2008, at 8:00 PM, Sascha Wilde wrote: My solution: 1. The userdb-only checkpassword script sees no AUTHORIZED in the environment and returns with an exit code != 0[0] You assume th

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Oct 20, 2008, at 8:00 PM, Sascha Wilde wrote: > >> My solution: >> >>1. The userdb-only checkpassword script sees no AUTHORIZED in the >> environment and returns with an exit code != 0[0] > > You assume that the script actually checks this.

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Timo Sirainen
On Oct 20, 2008, at 8:00 PM, Sascha Wilde wrote: My solution: 1. The userdb-only checkpassword script sees no AUTHORIZED in the environment and returns with an exit code != 0[0] You assume that the script actually checks this. There's no requirement that a userdb-only script needs

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Oct 20, 2008, at 7:08 PM, Sascha Wilde wrote: > >> I understand the idea now, but see above: we need the (userdb only) >> checkpassword script to follow our rules anyway, so instead of doing >> magic to the environment and checking for this in checkpa

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Timo Sirainen
On Oct 20, 2008, at 7:08 PM, Sascha Wilde wrote: I understand the idea now, but see above: we need the (userdb only) checkpassword script to follow our rules anyway, so instead of doing magic to the environment and checking for this in checkpassword- reply it should be sufficient for the scrip

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Mon, 2008-10-20 at 17:26 +0200, Sascha Wilde wrote: >> Currently the code handles only two cases: success and (any kind of) >> error. The passdb-checkpassword stuff seems not to handle "user >> doesn't exist" in any special way, so I don'

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Timo Sirainen
On Mon, 2008-10-20 at 17:26 +0200, Sascha Wilde wrote: > Currently the code handles only two cases: success and (any kind of) > error. The passdb-checkpassword stuff seems not to handle "user > doesn't exist" in any special way, so I don't see why the userdb > backend should. The

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-20 Thread Sascha Wilde
Timo Sirainen <[EMAIL PROTECTED]> writes: > On Fri, 2008-10-17 at 19:04 +0200, Sascha Wilde wrote: >> http://hg.intevation.org/kolab/dovecot-1.2_kolab-branch/ >> >> Timo, what would be needed to get the new back end upstream? > > Some small things: > > - rename checkpassword-common.c to db-checkp

Re: [Dovecot] New userdb backend for checkpassword like programs

2008-10-17 Thread Timo Sirainen
On Fri, 2008-10-17 at 19:04 +0200, Sascha Wilde wrote: > The back end needs a special checkpassword program which follows the > qmail semantics but additionally provides the user data without password > verification when the environment variable AUTHORIZED is set.[1] > > I have done some code clea

[Dovecot] New userdb backend for checkpassword like programs

2008-10-17 Thread Sascha Wilde
As announced in MID <[EMAIL PROTECTED]> I wrote[0] a new userdb back end, which uses a checkpassword like program to retrieve user data. This is needed to get computed user data without authentication for the LDA or the yet to be implemented %%h variable in shared user folder name spaces... The b