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 1064725

Summary: slapd with shell backend doesn't work
Product: Red Hat Enterprise Linux 6 Reporter: David Spurek <dspurek>
Component: openldapAssignee: Jan Synacek <jsynacek>
Status: CLOSED ERRATA QA Contact: David Spurek <dspurek>
Severity: low Docs Contact:
Priority: low    
Version: 6.5CC: dspurek, ebenes, jsynacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:58:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log output from '/usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap -d -1' , ldapsearch doesn't work
none
log output from '/usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap -f /etc/openldap/slapd.conf -d -1' , ldapsearch works none

Description David Spurek 2014-02-13 07:55:28 UTC
Description of problem:
slapd with shell backend doesn't work if it is started as a service.

# extended LDIF
#
# LDAPv3
# base <dc=foo,dc=bar,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: * 
#

# search result
search: 2
result: 53 Server is unwilling to perform
text: search not implemented

# numResponses: 1
:: [   FAIL   ] :: Running 'ldapsearch -x -b dc=foo,dc=bar,dc=com -D cn=Manager,dc=foo,dc=bar,dc=com -w x '*'' (Expected 0, got 53)


If I tried debug it, problem appeared with '/usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap -d -1' .
If I tried run slapd with -f parameter, e.g. '/usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap -f /etc/openldap/slapd.conf -d -1' then it works right. I don't know what is the difference in this case.

I am attaching debug outputs from both cases, maybe they help.

Version-Release number of selected component (if applicable):
openldap-2.4.23-32.el6_4.1

How reproducible:
always

Steps to Reproduce:
1.add following options to slapd.conf
moduleload back_shell.la
database       shell
suffix "dc=foo,dc=bar,dc=com"
search          /etc/openldap/shell/searchexample.sh 

2.searchexample.sh you can download here: https://github.com/gcp/openldap/blob/master/servers/slapd/back-shell/searchexample.sh
3.ldapsearch -x -b dc=foo,dc=bar,dc=com '*'

Actual results:
result: 53 Server is unwilling to perform
text: search not implemented

Expected results:
search works right

search: 2
result: 0 Success


Additional info:

Comment 1 David Spurek 2014-02-13 07:57:00 UTC
Created attachment 862654 [details]
log output from '/usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap -d -1' , ldapsearch doesn't work

Comment 2 David Spurek 2014-02-13 07:57:44 UTC
Created attachment 862655 [details]
log output from '/usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap -f /etc/openldap/slapd.conf -d -1' , ldapsearch works

Comment 9 errata-xmlrpc 2014-10-14 04:58:18 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/RHBA-2014-1426.html