Summary:ASTERISK-11661: [patch] Improve LDAP server configuration for res_config_ldap
Reporter:Tuomas Jormola (tjormola)Labels:
Date Opened:2008-03-17 11:35:40Date Closed:2008-03-19 15:08:15
Versions:Frequency of
Environment:Attachments:( 0) use-ldap-url.diff
Description:This patch alters res_config_ldap.c so that full LDAP URL is used internally to represent the LDAP server to use instead of using hostname and port variables. It's also possible to specify the full URL in res_ldap.conf using the new url keyword instead of just specifying host and port (but this works too, of course, so existing configurations should not break due to this change). Rationale behind this is that using a URL you can specify extra settings for the connections that are not available otherwise (e.g. you can use ldapi:// urls when connecting to a local OpenLDAP server, or you can specify the scope of the queries, see ldap_url(3) manual page for more info).

Also currently the port setting code is broken. It generates invalid LDAP URLs if both host and port of the LDAP server is specified in the configuration file.

The patch also fixes setting of the protocol. You can specify this in the configuration file, but the setting was never applied to the LDAP connection. Thus all connections were using LDAPv2 by default (at least when Asterisk is compiled against OpenLDAP 2.4).
Comments:By: Tuomas Jormola (tjormola) 2008-03-18 18:57:00

I feel a bit awkward giving out my personal contact information for such small things like these patches in this contributor license agreement thingy. Can't I just declare that this patch and the other I've recently submitted are public domain. Everyone, including Digium Inc., is free to do what ever they please with it, including re-licensing under any license.

By: Tilghman Lesher (tilghman) 2008-03-18 19:30:48

The developers don't ever look at the information.  The information is sent to an internal Digium lawyer for verification.

I'm sorry, but we cannot accept anything other than the licensing form, by policy.  If this is not acceptable to you, these issues will be closed without action.

By: Tuomas Jormola (tjormola) 2008-03-19 12:19:44

Well can't the message that these patches are public domain be forwarded to the lawyers for acceptance? I'm sorry, but your company's policy is very unfriendly for casual voluntary contributors fixing bugs when talking about trivial patches like this. Of course I do understand the need for solving the possible licensing issues thorougly when it's about implementing something new functionality, for which the contributor would retain copyright unless otherwise stated, of course.

By: Tilghman Lesher (tilghman) 2008-03-19 12:24:09

I'm not going to get into the legalities here, beyond that it's never been tested in court whether you can, in fact, release something to the public domain (the only provision for public domain under the law is through time expiration), while licensing agreements and terms have been ruled as enforceable.  Either you license your changes under the existing agreements, or we close the bugs.

By: Donny Kavanagh (donnyk) 2008-03-19 13:32:50

This is a bug, not a discussion forum.  Please take this type of discussion to IRC or the mailing list.

By: Tuomas Jormola (tjormola) 2008-03-19 14:51:18

Fine. I guess I can live without Asterisk, and definitely Asterisk can live without me. (And about getting into legalities, I guess I've been there too during this experiment, as someone with engineer's mind I did not even try to interpret the Digium license, and no, I don't have an attorney to help me, I live in a society where normal people still can cope with their lives without having one). So from my part, you can close the bug reports. Though I guess it's pretty easy to re-implement things based on the description, in case someone has desire to do so. I'd be very happy with that.

Pitäkää tunkkinne.