[tpop3d-discuss] auth-ldap module for tpop3d

Prune prune@xxxxxxxxxxxx
Wed, 06 Feb 2002 17:48:07 +0100


--------------040708000803030503070508
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



Chris Lightfoot wrote:

>On Wed, Feb 06, 2002 at 02:17:55PM +0100, Prune wrote:
>    [...]
>
>>I just have a problem, regarding the stringmap.c file.
>>I had a conf line never found by my module.
>>I added some debug (badly printf) in stringmap.c as follow :
>>
>    [...]
>
>>As you can probably see :
>>-when parsing the conf for directive "aaa", it checks first between 
>>"listen-address"
>>- then "" (nothing.... why ? there are no empty lines in the conf file...)
>>-then "auth-mysql-mail-group"
>>AND THAT'S ALL !!!!
>>:)
>>
>>why ?
>>
>>I simply tried to order my config file (sort...). then everything goes 
>>well. (but it checks with every line in the conf each time... not really 
>>optimized).
>>
>>Could we concider this a bug ?
>>I don't really understand the algo used in stringmap_find....
>>
>
>I'm not sure what your complaint is-- is it failing to
>find the `aaa' key after it's been inserted, or that it is
>not very efficient in this case? Per the comment at the
>top of stringmap.c, it doesn't try to balance the tree at
>all....
>
>If it's failing to find the entry at all, well, that's
>more serious....
>
It's just failing.
aaa (added for test) was 'auth-ldap-filter-attr' at the begining.
can you explain me the first part of the debug.... why is it comparing 
the configuration key 'aaa' to the first entry in the configuration 
file, then to a blank line, then to another one and the stop ??

recall :

---
les attrisbuts stringmap : aaa  listen-address
les attrisbuts stringmap : aaa
les attrisbuts stringmap : aaa  auth-mysql-mail-group
auth_mysql_init: filter-attr fail from the conf
---

Why does it work when the configuration file lines are sorted ?

>>I'm cleanning the code and converting it from the "auth_mysql.c" name to 
>>"auth_ldap.c". Then it will be released as a patch.
>>stay tuned.
>>
>
>Excellent. Are you happy for me to integrate it into the
>distribution? Also, could you tell me how to set up a
>minimal LDAP installation so that I can try it out on my
>machine.
>
Of course you'll add this to the distrib !!!! (I hope, in fact :)
For testing, go to http://www.openldap.org
download latest release
compile as said in the doc (there is a quick start on the homepage I 
think), but it's pretty obvious :

cd openldap-2.0.22
./configure --prefix=/opt/ldap/openldap --without-cyrus-sasl 
--enable-dynamic --enable-rlookups
make depend
make
make install

edit the /opt/ldap/openldap/etc/openldap/slapd.conf and change the 
rootdn and the password :
rootdn ="dc=your_domain,dc=com", for example
password = foo

then start /opt/ldap/openldap/libexec/slapd

for debug (level 64, see the doc for more, '-1' is full debut) or if you 
only want to bind some ip's or port (default 389) add :
/opt/ldap/openldap/libexec/slapd -d 64 -h ldap://ip:port/

then you have to add some data
....
see the doc, you have to do it with ldif files.

rearch for ldapbrowser, a java interface, pretty good, or 'gq', a gtk 
frontend for unix.

Ldap is not as simple as a DB, I think. look around www.openldap.org for 
details.

Cheers,

Prune

>

--------------040708000803030503070508
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit






Chris Lightfoot wrote:
On Wed, Feb 06, 2002 at 02:17:55PM +0100, Prune wrote:
[...]
I just have a problem, regarding the stringmap.c file.
I had a conf line never found by my module.
I added some debug (badly printf) in stringmap.c as follow :
    [...]
As you can probably see :
-when parsing the conf for directive "aaa", it checks first between
"listen-address"
- then "" (nothing.... why ? there are no empty lines in the conf file...)
-then "auth-mysql-mail-group"
AND THAT'S ALL !!!!
:)

why ?

I simply tried to order my config file (sort...). then everything goes
well. (but it checks with every line in the conf each time... not really
optimized).

Could we concider this a bug ?
I don't really understand the algo used in stringmap_find....

I'm not sure what your complaint is-- is it failing to
find the `aaa' key after it's been inserted, or that it is
not very efficient in this case? Per the comment at the
top of stringmap.c, it doesn't try to balance the tree at
all....

If it's failing to find the entry at all, well, that's
more serious....
It's just failing.
aaa (added for test) was 'auth-ldap-filter-attr' at the begining.
can you explain me the first part of the debug.... why is it comparing the configuration key 'aaa' to the first entry in the configuration file, then to a blank line, then to another one and the stop ??

recall :

---
les attrisbuts stringmap : aaa  listen-address
les attrisbuts stringmap : aaa
les attrisbuts stringmap : aaa  auth-mysql-mail-group
auth_mysql_init: filter-attr fail from the conf
---

Why does it work when the configuration file lines are sorted ?
I'm cleanning the code and converting it from the "auth_mysql.c" name to 
"auth_ldap.c". Then it will be released as a patch.
stay tuned.

Excellent. Are you happy for me to integrate it into the
distribution? Also, could you tell me how to set up a
minimal LDAP installation so that I can try it out on my
machine.
Of course you'll add this to the distrib !!!! (I hope, in fact :)
For testing, go to http://www.openldap.org
download latest release
compile as said in the doc (there is a quick start on the homepage I think), but it's pretty obvious :

cd openldap-2.0.22
./configure --prefix=/opt/ldap/openldap --without-cyrus-sasl --enable-dynamic --enable-rlookups
make depend
make
make install

edit the /opt/ldap/openldap/etc/openldap/slapd.conf and change the rootdn and the password :
rootdn ="dc=your_domain,dc=com", for example
password = foo

then start /opt/ldap/openldap/libexec/slapd

for debug (level 64, see the doc for more, '-1' is full debut) or if you only want to bind some ip's or port (default 389) add :
/opt/ldap/openldap/libexec/slapd -d 64 -h ldap://ip:port/

then you have to add some data
....
see the doc, you have to do it with ldif files.

rearch for ldapbrowser, a java interface, pretty good, or 'gq', a gtk frontend for unix.

Ldap is not as simple as a DB, I think. look around www.openldap.org for details.

Cheers,

Prune


--------------040708000803030503070508--