Issue 8840 - domainScope control is not properly implemented
Summary: domainScope control is not properly implemented
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.45
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-20 14:28 UTC by elecharny@openldap.org
Modified: 2018-12-19 17:23 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 elecharny@openldap.org 2018-04-20 14:28:47 UTC
Full_Name: Emmanuel Lecharny
Version: 2.4.45
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (82.123.98.139)


There has been a change back in 2011 in the controls.c code :

https://github.com/Symas/openldap/commit/4e32148ac59ba6b4f3acc79a3b782cd3556f941a#diff-8237ff8d4da3d46fed54a93482b3a908

Line 1460 was :
if ( ctrl->ldctl_value.bv_len ) {

and was transformed to line 1516 :
if ( BER_BVISNULL( &ctrl->ldctl_value )) {

when it was expected to be :

if ( !BER_BVISNULL( &ctrl->ldctl_value )) {

as this control is not expecting any value.

The consequence is that using this control in ldapsearch leads to an error being
generated :

"domainScope control value not empty"

Comment 1 Quanah Gibson-Mount 2018-04-23 15:11:17 UTC
--On Friday, April 20, 2018 3:28 PM +0000 elecharny@symas.com wrote:

> Full_Name: Emmanuel Lecharny
> Version: 2.4.45
> OS:
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (82.123.98.139)
>
>
> There has been a change back in 2011 in the controls.c code :
>
> https://github.com/Symas/openldap/commit/4e32148ac59ba6b4f3acc79a3b782cd3
> 556f941a#diff-8237ff8d4da3d46fed54a93482b3a908

This is not a valid link, as it points to a private repository.  In the 
future, please provide a valid reference.

The commit at issue is:

commit f810e6ed417939ed69b388ad7fb0c696e185f593
Author: Kurt Zeilenga <kurt@openldap.org>
Date:   Fri Apr 20 22:32:58 2007 +0000

    Distinguish absent control value from empty control value.


--Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>


Comment 2 Quanah Gibson-Mount 2018-04-30 17:33:55 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2018-07-03 23:34:24 UTC
changed notes
changed state Test to Release
Comment 4 OpenLDAP project 2018-12-19 17:23:05 UTC
Fixed in master
Fixed in RE24 (2.4.47)
Comment 5 Quanah Gibson-Mount 2018-12-19 17:23:05 UTC
changed notes
changed state Release to Closed