Issue 5879 - LDAPConnection doesn't always uses default constraints for referral handling
Summary: LDAPConnection doesn't always uses default constraints for referral handling
Status: UNCONFIRMED
Alias: None
Product: JLDAP
Classification: Unclassified
Component: JLDAP (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 22:38 UTC by maurice.smulders@quantum.com
Modified: 2020-03-19 05:23 UTC (History)
0 users

See Also:


Attachments
LDAPConnection.java (165.93 KB, text/x-java)
2009-01-07 23:14 UTC, maurice.smulders@quantum.com
Details

Note You need to log in before you can comment on or make changes to this issue.
Description maurice.smulders@quantum.com 2009-01-07 22:38:53 UTC
Full_Name: Maurice Smulders
Version: novell-jldap-devel-2008.03.01
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (208.230.118.253)


using 

I created a LDAPBindHandler, and then called the read api as follows:

ldapEntry = ldapConnection.read(userCtx.toString(),searchConstraints);

No default constraints are set on the connection.

The referral handler never calls into my bindhandler. The workaround currently
is to set a default bind handler. Fix looks to be:

com/novell/ldap/LDAPConnection.java:3770:
    private ReferralInfo getReferralConnection( String[] referrals)
                    throws LDAPReferralException

Change to:
    private ReferralInfo getReferralConnection( String[] referrals,
LDAPConstraints cons)
                    throws LDAPReferralException

And down below: 
change
        LDAPReferralHandler rh = defSearchCons.getReferralHandler();
to:
        if (cons == null)
        {
           cons = defSearchCons;
        }
        LDAPReferralHandler rh = cons.getReferralHandler();

This should then support passed in LDAPConstraints()



Comment 1 maurice.smulders@quantum.com 2009-01-07 23:14:23 UTC
Hello,

Attached is the suggested LDAPConnection.java to fix this issue. 

Thanks,

Maurice
________________________________________________________________________
________________________________________
Maurice Smulders| Firmware Engineer | Quantum Corporation | Office:
720.249.3817 | Mobile: 720.514.0310 | Maurice.Smulders@quantum.com
-----Original Message-----
From: openldap-its@OpenLDAP.org [mailto:openldap-its@OpenLDAP.org] 
Sent: Wednesday, January 07, 2009 3:39 PM
To: Maurice Smulders
Subject: Re: (ITS#5879) LDAPConnection doesn't always uses default
constraints for referral handling


*** THIS IS AN AUTOMATICALLY GENERATED REPLY ***

Thanks for your report to the OpenLDAP Issue Tracking System.  Your
report has been assigned the tracking number ITS#5879.

One of our support engineers will look at your report in due course.
Note that this may take some time because our support engineers
are volunteers.  They only work on OpenLDAP when they have spare
time.

If you need to provide additional information in regards to your
issue report, you may do so by replying to this message.  Note that
any mail sent to openldap-its@openldap.org with (ITS#5879)
in the subject will automatically be attached to the issue report.

	mailto:openldap-its@openldap.org?subject=(ITS#5879)

You may follow the progress of this report by loading the following
URL in a web browser:
    http://www.OpenLDAP.org/its/index.cgi?findid=5879

Please remember to retain your issue tracking number (ITS#5879)
on any further messages you send to us regarding this report.  If
you don't then you'll just waste our time and yours because we
won't be able to properly track the report.

Please note that the Issue Tracking System is not intended to
be used to seek help in the proper use of OpenLDAP Software.
Such requests will be closed.

OpenLDAP Software is user supported.
	http://www.OpenLDAP.org/support/

--------------
Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved.

Comment 2 Howard Chu 2009-01-26 09:12:24 UTC
changed notes
moved from Incoming to Contrib
Comment 3 OpenLDAP project 2014-08-01 21:03:28 UTC
jldap