Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 677200

Summary: dev-libs/cyrus-sasl USE=gdbm with >=sys-libs/gdbm-1.17 does not report lookup failures correctly
Product: Gentoo Linux Reporter: Jonas Jelten <jj>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: holger, jj, net-mail+disabled
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: copy the correct errno value to check against later

Description Jonas Jelten 2019-02-03 16:23:11 UTC
gdbm_close of >=sys-libs/gdbm-1.17 also sets gdbm_errno. This overlays a value that is used for returning a lookup failure.

archlinux bug: https://bugs.archlinux.org/task/59873

upstream patch: https://github.com/cyrusimap/cyrus-sasl/pull/554
Comment 1 Jonas Jelten 2019-02-03 16:44:25 UTC
Created attachment 563674 [details, diff]
copy the correct errno value to check against later

patch fixing the issue, also submitted upstream: https://github.com/cyrusimap/cyrus-sasl/pull/554
Comment 2 Holger Hoffstätte 2020-02-16 14:43:42 UTC
Can confirm that the patch works and restores the ability to migrate cyrus-sasl from berkdb to gdbm (which otherwise fails with very misleading auth errors).
My system is now completely berkdb-free. Thank You!
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-23 00:51:29 UTC
FWIW, this patch did actually get added at some point: https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-libs/cyrus-sasl?id=0ea0e5c7d34102447316e0ec3e9a4aa82e4523bf