Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 836386

Summary: slapi_ldap_bind() doesn't check bind results
Product: Red Hat Enterprise Linux 6 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: jgalipea, mreynolds
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.11.12-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: Internally, we only checked the bind result, if LDAP controls were passed in for internal connections Consequence: We would report success regardless if there was an error. Fix: Always check the result, regardless if control were passed in or not. Result: Correct bind result
Story Points: ---
Clone Of:
: 856089 (view as bug list) Environment:
Last Closed: 2013-02-21 08:19:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 856089    

Description Nathan Kinder 2012-06-28 21:44:49 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/399

The slapi_ldap_bind() function does not properly check the bind operation results.  It currently only calls ldap_parse_result() if returnedctrls was passed in by the caller.  We need to call ldap_parse_result() even if we don't need to get the returned controls, as it's how we get the LDAP response code for the BIND operation.  With the current code, slapi_ldap_bind() will end up returning 0 for a failed BIND operation if returnedctrls is not passed in.

Comment 1 Nathan Kinder 2012-07-02 20:14:38 UTC
*** Bug 836385 has been marked as a duplicate of this bug. ***

Comment 2 Jenny Severance 2012-07-09 19:20:48 UTC
Please add steps to reproduce this bug

Comment 3 mreynolds 2012-08-24 15:53:10 UTC
Created testcase (bug836386()) in mmrepl/accept/ as replication uses slapi_ldap_bind.

Comment 5 Jenny Severance 2013-01-14 15:31:39 UTC
verified ::

200|0 24 17:32:28|TP Start
520|0 24 16496 1 1|
520|0 24 16496 1 2|bug836386 - make sure slapi_ldap_bind complains when an invalid password is used
520|0 24 16496 1 3|bug836386 Restore agreement for S2->S1: SIMPLE to SSL
520|0 24 16496 1 4|bug836386 Restored
520|0 24 16496 1 5|slapi_ldap_bind correctly indentified the failure, nsDS5ReplicaCredentials is correctly restored to secret12, Return code-0
520|0 24 16496 1 6|TestCase [bug836386] result-> [PASS]
220|0 24 0 17:32:41|PASS

version :: 389-ds-base-1.2.11.15-8.el6

Comment 6 errata-xmlrpc 2013-02-21 08:19:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0503.html