Bug 734944 - Berkeley db 5 support breaks existing sasldb2 database
Summary: Berkeley db 5 support breaks existing sasldb2 database
Alias: None
Product: Fedora
Classification: Fedora
Component: cyrus-sasl
Version: 17
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-31 22:25 UTC by Michael Fischer
Modified: 2013-08-01 18:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-08-01 18:00:40 UTC

Attachments (Terms of Use)

Description Michael Fischer 2011-08-31 22:25:20 UTC
Description of problem:
Sasl authentication in subversion fails with log message
svnserve: unable to open Berkeley db /etc/sasl2/sasldb2: Invalid argument

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

How reproducible:

Steps to Reproduce:
1. Set up subversion repository to use sasl authentication
2. Attempt 'svn update'.
Actual results:
"svn: Malformed network data" printed to console.
/var/log/messages contains line "svnserve: unable to open Berkeley db /etc/sasl2/sasldb2: Invalid argument".

Expected results:
At revision 17.

Additional info:
Downgrading to cyrus-sasl-2.1.23-16.fc15.x86_64 makes the problem disappear.

Comment 2 Fedora Admin XMLRPC Client 2012-01-10 02:16:50 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Michael Fischer 2012-06-20 22:27:09 UTC
I just installed Fedora 17 and found the same behavior with the current cyrus-sasl-2.1.23-29.fc17.x86_64 as I had with the older version -- same error messages to console and log.  

I couldn't downgrade to a lower version this time, so the workaround was to rebuild the rpms from source, with one important change to the cyrus-sasl.spec file:
< BuildRequires: libdb-devel
> BuildRequires: db4-devel
This causes the package to link with the Berkeley DB version 4.8 libraries rather than with the 5.2.  Now it works again!

It would be nice if cyrus-sasl worked with the version 5 Berkeley DB, but until it does, it should be built against the older version 4.

Comment 4 Petr Lautrbach 2012-10-18 14:40:13 UTC
So it's probably due this commit:
commit 6f3490c81fcdeb8eee479201e56e65633de0a493
Author: Jan F. Chadima <jfch@eglon.jagda.eu>
Date:   Mon Jul 25 19:16:58 2011 +0200

    Add support for berkeley db 5

The commit itself looks fine. 

Could you please provide more specific reproducer so that I can setup it myself and try to reproduce? Thanks.

Comment 5 Michael Fischer 2012-10-19 01:24:36 UTC
The original report contains all I know:  I was successfully using sasl authentication for several subversion repositories.  The sasl password database file type is
    (ohia:2.1)/etc/sasl2# file sasldb2 
    sasldb2: Berkeley DB (Hash, version 9, native byte-order)
When cyrus-sasl is linked to berkeley db 5, subversion fails with
"svn: Malformed network data" printed to console, and 
/var/log/messages containing line "svnserve: unable to open Berkeley db /etc/sasl2/sasldb2: Invalid argument".
My current workaround was to rebuild cyrus-sasl-2.1.23-29.fc17.src.rpm with the one change to the spec file listed in comment #3.
Apparently the "Malformed network data" message is a catch-all error message from subversion when something fails during authentication.  The log message suggests some incompatibility between either db4 and db5 file formats or the api for opening the sasl database file.  Perhaps the subversion server needs to be updated to work with db 5, but I would expect it to delegate that task to cyrus-sasl.

Please let me know what additional information might help.

Comment 6 Fedora End Of Life 2013-07-04 06:26:27 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2013-08-01 18:00:45 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 Michael Fischer 2013-08-01 18:48:26 UTC
Subversion with sasl authentication works in Fedora 19 using component releases

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