Issue 8329 - id_query config in the back_sql module
Summary: id_query config in the back_sql module
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.43
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-03 17:57 UTC by paterry@gmx.com
Modified: 2016-02-11 00:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description paterry@gmx.com 2015-12-03 17:57:53 UTC
Full_Name: Paul Terry
Version: 2.4.43
OS: Red Hat Enterprise Server 6.7
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (85.91.5.16)


If the following line is in slapd.conf for the back_sql.la module:

id_query "SELECT id, keyval, oc_map_id, dn FROM ldap_entries WHERE pusername =
?"

Then slapd will not start and logs the following error:

Nov 30 12:00:59 testbrazilldap01 slapd[24111]: /etc/openldap/slapd.conf: line
36: unknown directive <id_query> inside backend database definition.

This worked correctly in version 2.4.23.

After looking through the code, the 'id_query' configuration appears to be
missing from servers/slapd/back-sql/config.c, while it was present in that file
for version 2.4.23.

I've sent a patch for config.c named paul-terry-151203.patch
Comment 1 Quanah Gibson-Mount 2015-12-03 18:12:21 UTC
--On Thursday, December 03, 2015 5:57 PM +0000 paterry@gmx.com wrote:

> Full_Name: Paul Terry
> Version: 2.4.43
> OS: Red Hat Enterprise Server 6.7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (85.91.5.16)
>
>
> If the following line is in slapd.conf for the back_sql.la module:
>
> id_query "SELECT id, keyval, oc_map_id, dn FROM ldap_entries WHERE
> pusername = ?"
>
> Then slapd will not start and logs the following error:
>
> Nov 30 12:00:59 testbrazilldap01 slapd[24111]: /etc/openldap/slapd.conf:
> line 36: unknown directive <id_query> inside backend database definition.
>
> This worked correctly in version 2.4.23.
>
> After looking through the code, the 'id_query' configuration appears to be
> missing from servers/slapd/back-sql/config.c, while it was present in
> that file for version 2.4.23.
>
> I've sent a patch for config.c named paul-terry-151203.patch
>

Broken in 6d57371903bccab23eaf7b909136d9e7a7e1ec81

--Quanah

--

Quanah Gibson-Mount
Platform Architect
Zimbra, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Comment 2 Howard Chu 2015-12-03 18:59:35 UTC
paterry@gmx.com wrote:
> Full_Name: Paul Terry
> Version: 2.4.43
> OS: Red Hat Enterprise Server 6.7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (85.91.5.16)
>
>
> If the following line is in slapd.conf for the back_sql.la module:
>
> id_query "SELECT id, keyval, oc_map_id, dn FROM ldap_entries WHERE pusername =
> ?"
>
> Then slapd will not start and logs the following error:
>
> Nov 30 12:00:59 testbrazilldap01 slapd[24111]: /etc/openldap/slapd.conf: line
> 36: unknown directive <id_query> inside backend database definition.
>
> This worked correctly in version 2.4.23.
>
> After looking through the code, the 'id_query' configuration appears to be
> missing from servers/slapd/back-sql/config.c, while it was present in that file
> for version 2.4.23.
>
> I've sent a patch for config.c named paul-terry-151203.patch
>
>
Thanks for the patch. It's incomplete though, the olcSqlIdQuery attribute also 
needs to be added to the config objectclass.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 3 Howard Chu 2015-12-03 20:12:01 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 4 Quanah Gibson-Mount 2016-01-04 21:23:41 UTC
changed notes
changed state Test to Release
Comment 5 OpenLDAP project 2016-02-11 00:51:21 UTC
fixed in master
fixed in RE25
Fixed in RE24 (2.4.44)
Comment 6 Quanah Gibson-Mount 2016-02-11 00:51:21 UTC
changed notes
changed state Release to Closed