Bug 730667

Summary: memberof overlay not work
Product: Red Hat Enterprise Linux 6 Reporter: David Spurek <dspurek>
Component: openldapAssignee: Jan Vcelak <jvcelak>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: dspurek, ebenes, jplans, jvcelak, omoris, tsmetana
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: 2011-08-16 14:14:07 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:
Attachments:
Description Flags
runtest.sh
none
data.ldif
none
Slapd configuration file none

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

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):
openldap-2.4.23-15.el6

How reproducible:
always

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]
data.ldif

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.