Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-13 Thread Durk Strooisma
Thanks for the example and your info about fd4. Durk > Durk Strooisma wrote: >> Okay, thanks for verifying. What kind of scripting language would you >> suggest for checkpassword instead? > > Perl works for me. Extract from such script: > >use constant CHECKPASSWORD_MAX_LEN => 512; >[...]

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-13 Thread Durk Strooisma
>> read -d '\0' -r -u 3 > You are missing the correct syntax to interpret backslash escapes here: > > read -d $'\0' -r -u 3 > > will work. Thanks a lot!! I was indeed missing the $ sign! And it is nicely documented here: http://www.gnu.org/software/bash/manual/bashref.html#ANSI_002dC-Quoting I n

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-13 Thread Heiko Schlichting
Durk Strooisma wrote: > Okay, thanks for verifying. What kind of scripting language would you > suggest for checkpassword instead? Perl works for me. Extract from such script: use constant CHECKPASSWORD_MAX_LEN => 512; [...] my $input = IO::Handle->new_from_fd(3, "r"); if (not def

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Lutz Preßler
Hello Durk, Am Montag, 12. Januar 2009 schrieb Durk Strooisma: > I'm trying to implement checkpassword authentication with a simple bash > script. In some way I can't get the password from file descriptor 3. > > The start of script looks like this: > > #!/bin/bash > > read -d '\0' -r -u 3 You a

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Durk Strooisma
> On Mon, 2009-01-12 at 20:54 +0100, Durk Strooisma wrote: >> > On Mon, 2009-01-12 at 18:31 +0100, Durk Strooisma wrote: >> >> #!/bin/bash >> >> >> >> read -d '\0' -r -u 3 >> > >> > Are you sure this is supposed to work? \0 character is an >> > end-of-string character in C language, and I wouldn't

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Timo Sirainen
On Mon, 2009-01-12 at 20:54 +0100, Durk Strooisma wrote: > > On Mon, 2009-01-12 at 18:31 +0100, Durk Strooisma wrote: > >> #!/bin/bash > >> > >> read -d '\0' -r -u 3 > > > > Are you sure this is supposed to work? \0 character is an end-of-string > > character in C language, and I wouldn't be surpri

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Durk Strooisma
> On Mon, 2009-01-12 at 18:31 +0100, Durk Strooisma wrote: >> #!/bin/bash >> >> read -d '\0' -r -u 3 > > Are you sure this is supposed to work? \0 character is an end-of-string > character in C language, and I wouldn't be surprised if read simply > didn't support it as delimiter. Well if I try to

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Timo Sirainen
On Mon, 2009-01-12 at 18:31 +0100, Durk Strooisma wrote: > #!/bin/bash > > read -d '\0' -r -u 3 Are you sure this is supposed to work? \0 character is an end-of-string character in C language, and I wouldn't be surprised if read simply didn't support it as delimiter. signature.asc Description: