Bug 730667 - memberof overlay not work
Summary: memberof overlay not work
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openldap
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jan Vcelak
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-15 10:16 UTC by David Spurek
Modified: 2015-03-02 05:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-08-16 14:14:07 UTC

Attachments (Terms of Use)
runtest.sh (3.63 KB, application/x-sh)
2011-08-15 10:16 UTC, David Spurek
no flags Details
data.ldif (599 bytes, application/octet-stream)
2011-08-15 10:16 UTC, David Spurek
no flags Details
Slapd configuration file (1.96 KB, application/octet-stream)
2011-08-15 10:17 UTC, David Spurek
no flags Details

Description David Spurek 2011-08-15 10:16:13 UTC
Created attachment 518243 [details]

Description of problem:
memberof overlay not work with base example from openldap documentation (http://www.openldap.org/doc/admin24/overlays.html#Reverse%20Group%20Membership%20Maintenance)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.run runtest.sh from attachment
2.check ldapsearch output
Actual results:
dn: uid=test1,ou=People,dc=my-domain,dc=com

Expected results:
dn: uid=test1,ou=People,dc=my-domain,dc=com
memberOf: cn=testgroup,ou=Group,dc=my-domain,dc=com

Comment 1 David Spurek 2011-08-15 10:16:47 UTC
Created attachment 518244 [details]

Comment 2 David Spurek 2011-08-15 10:17:05 UTC
Created attachment 518245 [details]
Slapd configuration file

Comment 3 Jan Vcelak 2011-08-16 14:14:07 UTC
The test is importing the data using slapadd. That tool is used to directly modify the database content without any other processing. It should be used only for importing backups and similar. After fixing the test to use ldapadd instead of slapadd, it works as expected.

# test1, People, my-domain.com
dn: uid=test1,ou=People,dc=my-domain,dc=com
memberOf: cn=testgroup,ou=Group,dc=my-domain,dc=com

Anyway... presence of memberOf is not checked by the test. And the test will always fail on 64-bit systems because of "modulepath /usr/lib/openldap" in slapd.conf.

--- runtest.sh  2011-08-16 14:03:24.104903322 -0400
+++ runtest.sh.fix      2011-08-16 14:04:04.917907462 -0400
@@ -85,16 +85,14 @@
        rlRun "slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/" 0-255
        rlRun "chown -R ldap:ldap /etc/openldap/slapd.d/" 0
+       rlRun "rm -rf /var/lib/ldap/*" 0
-       # Load testing data.
-       rlRun "slapadd -l data.ldif" 0
-       rlRun "chown -R ldap:ldap /var/lib/ldap" 0
        # SELinux cleaning.
        rlRun "restorecon -Rv /etc/"
        rlRun "service slapd start && sleep 5" 0
+       rlRun "ldapadd -D $BDN -w $PWD -f data.ldif" 0
        rlRun "ldapsearch -LLL -D $BDN -w $PWD -b dc=my-domain,dc=com \"(uid=test1)\" memberOf" 0

Closing as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.