Issue 8337 - olcDbChecksum not allowed in olcHdbConfig/olcBdbConfig
Summary: olcDbChecksum not allowed in olcHdbConfig/olcBdbConfig
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.43
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-12 16:05 UTC by kenneth.penza@gov.mt
Modified: 2016-02-11 00:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kenneth.penza@gov.mt 2015-12-12 16:05:30 UTC
Full_Name: Kenneth Penza
Version: 2.4.43
OS: CentOS 7.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (46.11.36.84)


olcDbChecksum is not accepted for BDB and HDB backends (whilst its documented in
the manual pages). Below please find files and steps to reproduce.

File attached:

configbdb.ldif - ldif file to create config database with BDB backend and
checksum enabled. Uploaded in
ftp://ftp.openldap.org/incoming/kenneth-penza-151212-configbdb.ldif

confighdb.ldif - ldif file to create config database with HDB backend and
checksum enabled. Uploaded in
ftp://ftp.openldap.org/incoming/kenneth-penza-151212-confighdb.ldif

Test case:

mkdir -p /tmp/dummyconfig/slapd.d.{b,h}db
cd /tmp/dummyconfig

slapadd -v -F slapd.d.bdb -n 0 -l configbdb.ldif
slapadd -v -F slapd.d.hdb -n 0 -l confighdb.ldif


For BDB it reports:

566c3f04 Entry (olcDatabase={2}bdb,cn=config), attribute 'olcDbChecksum' not
allowed
slapadd: dn="olcDatabase={2}bdb,cn=config" (line=1070): (65) attribute
'olcDbChecksum' not allowed

For HDB it reports:

566c41e2 Entry (olcDatabase={2}hdb,cn=config), attribute 'olcDbChecksum' not
allowed
slapadd: dn="olcDatabase={2}hdb,cn=config" (line=1070): (65) attribute
'olcDbChecksum' not allowed

Kenneth
Comment 1 Howard Chu 2015-12-12 16:15:19 UTC
kenneth.penza@gov.mt wrote:
> Full_Name: Kenneth Penza
> Version: 2.4.43
> OS: CentOS 7.1
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (46.11.36.84)
>
>
> olcDbChecksum is not accepted for BDB and HDB backends (whilst its documented in
> the manual pages). Below please find files and steps to reproduce.

Thanks for the report, fixed now in git master.
>
> File attached:
>
> configbdb.ldif - ldif file to create config database with BDB backend and
> checksum enabled. Uploaded in
> ftp://ftp.openldap.org/incoming/kenneth-penza-151212-configbdb.ldif
>
> confighdb.ldif - ldif file to create config database with HDB backend and
> checksum enabled. Uploaded in
> ftp://ftp.openldap.org/incoming/kenneth-penza-151212-confighdb.ldif
>
> Test case:
>
> mkdir -p /tmp/dummyconfig/slapd.d.{b,h}db
> cd /tmp/dummyconfig
>
> slapadd -v -F slapd.d.bdb -n 0 -l configbdb.ldif
> slapadd -v -F slapd.d.hdb -n 0 -l confighdb.ldif
>
>
> For BDB it reports:
>
> 566c3f04 Entry (olcDatabase={2}bdb,cn=config), attribute 'olcDbChecksum' not
> allowed
> slapadd: dn="olcDatabase={2}bdb,cn=config" (line=1070): (65) attribute
> 'olcDbChecksum' not allowed
>
> For HDB it reports:
>
> 566c41e2 Entry (olcDatabase={2}hdb,cn=config), attribute 'olcDbChecksum' not
> allowed
> slapadd: dn="olcDatabase={2}hdb,cn=config" (line=1070): (65) attribute
> 'olcDbChecksum' not allowed
>
> Kenneth
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2015-12-12 16:16:11 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 kenneth.penza@gov.mt 2015-12-15 07:25:58 UTC
>From: Howard Chu [mailto:hyc@symas.com] 
>Sent: Saturday, 12 December 2015 17:15
>To: Penza Kenneth at MITA; openldap-its@OpenLDAP.org
>Subject: Re: (ITS#8337) olcDbChecksum not allowed in olcHdbConfig/olcBdbConfig
>
>kenneth.penza@gov.mt wrote:
>> Full_Name: Kenneth Penza
>> Version: 2.4.43
>> OS: CentOS 7.1
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (46.11.36.84)
>>
>>
>> olcDbChecksum is not accepted for BDB and HDB backends (whilst its 
>> documented in the manual pages). Below please find files and steps to reproduce.
>
>Thanks for the report, fixed now in git master.
>>
>> File attached:
>>
>> configbdb.ldif - ldif file to create config database with BDB backend 
>> and checksum enabled. Uploaded in 
>> ftp://ftp.openldap.org/incoming/kenneth-penza-151212-configbdb.ldif
>>
>> confighdb.ldif - ldif file to create config database with HDB backend 
>> and checksum enabled. Uploaded in 
>> ftp://ftp.openldap.org/incoming/kenneth-penza-151212-confighdb.ldif
>>
>> Test case:
>>
>> mkdir -p /tmp/dummyconfig/slapd.d.{b,h}db cd /tmp/dummyconfig
>>
>> slapadd -v -F slapd.d.bdb -n 0 -l configbdb.ldif slapadd -v -F 
>> slapd.d.hdb -n 0 -l confighdb.ldif
>>
>>
>> For BDB it reports:
>>
>> 566c3f04 Entry (olcDatabase={2}bdb,cn=config), attribute 
>> 'olcDbChecksum' not allowed
>> slapadd: dn="olcDatabase={2}bdb,cn=config" (line=1070): (65) attribute 
>> 'olcDbChecksum' not allowed
>>
>> For HDB it reports:
>>
>> 566c41e2 Entry (olcDatabase={2}hdb,cn=config), attribute 
>> 'olcDbChecksum' not allowed
>> slapadd: dn="olcDatabase={2}hdb,cn=config" (line=1070): (65) attribute 
>> 'olcDbChecksum' not allowed
>>
>> Kenneth
>>
>>
>
>
>-- 
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/

I have pulled the sources that had the fix from the git repository and recompiled openldap. Following the patch, config creation worked fine.

To verify that it is working as expected, I tested with the olcDbChecksum set to true/false and verified the checksum flag of the database created as per below output.

For both BDB/HDB backends, olcDbChecksum set to true, removed all files under /var/lib/ldap/*  and started server to re-create database.

[root@host01 ldap]# db_dump /var/lib/ldap/dn2id.bdb 
VERSION=3
format=bytevalue
type=btree
chksum=1
duplicates=1
dupsort=1
db_pagesize=4096
HEADER=END
DATA=END
[root@host01 ldap]# 

For both BDB/HDB backends, olcDbChecksum set to false, removed all files under /var/lib/ldap/*  and started server to re-create database.

[root@host01 ldap]# db_dump /var/lib/ldap/dn2id.bdb 
VERSION=3
format=bytevalue
type=btree
duplicates=1
dupsort=1
db_pagesize=4096
HEADER=END
DATA=END
[root@host01 ldap]# 

From the output above, it is working as expected. Thanks for your prompt support and patch.

Regards
Kenneth

Comment 4 Quanah Gibson-Mount 2016-01-04 21:25:34 UTC
changed notes
changed state Test to Release
Comment 5 OpenLDAP project 2016-02-11 00:51:33 UTC
fixed in master
fixed in RE25
fixed in RE24 (2.4.44)
Comment 6 Quanah Gibson-Mount 2016-02-11 00:51:33 UTC
changed notes
changed state Release to Closed