Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245378 - sys-libs/ncurses-5.7 tries to open databases which do not exist and doesn't handle this gracefully
Summary: sys-libs/ncurses-5.7 tries to open databases which do not exist and doesn't h...
Status: RESOLVED DUPLICATE of bug 245370
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-03 10:30 UTC by Heiko Wundram
Modified: 2008-11-03 14:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Wundram 2008-11-03 10:30:44 UTC
The latest version of sys-libs/ncurses (5.7) tries to open terminfo.db in several locations, and does not check whether the BDB-returned handle is valid before trying to access the database.

This gives annoying console output in the form "DB->get: method not permitted before handle's open method".

Reproducible: Always

Steps to Reproduce:
1. upgrade to latest ncurses
2. open a new shell (anything that uses terminfo, actually)
3.

Actual Results:  
modelnine@mail01 ~ $ bash
DB->get: method not permitted before handle's open method
DB->get: method not permitted before handle's open method
modelnine@mail01 ~ $

Expected Results:  
The ncurses library should handle failure to open database files gracefully, i.e. not display an error when opening databases in non-default locations fails.

strace of the failure (when starting a bash):

ioctl(255, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(255, TIOCGWINSZ, {ws_row=64, ws_col=235, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
stat64("/home/modelnine/.terminfo", 0xbfb33718) = -1 ENOENT (No such file or directory)
stat64("/home/modelnine/.terminfo.db", 0xbfb3336c) = -1 ENOENT (No such file or directory)
fstat64(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f28000
write(2, "DB->get: method not permitted bef"..., 58DB->get: method not permitted before handle's open method
) = 58
stat64("/etc/terminfo", 0xbfb33718)     = -1 ENOENT (No such file or directory)
stat64("/etc/terminfo.db", 0xbfb3336c)  = -1 ENOENT (No such file or directory)
write(2, "DB->get: method not permitted bef"..., 58DB->get: method not permitted before handle's open method
) = 58
stat64("/usr/share/terminfo", 0xbfb33718) = -1 ENOENT (No such file or directory)
stat64("/usr/share/terminfo.db", {st_mode=S_IFREG|0644, st_size=4685824, ...}) = 0
open("/usr/share/terminfo.db", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
Comment 1 nictki 2008-11-03 12:17:09 UTC
same here ~amd64
Comment 2 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-03 14:45:52 UTC

*** This bug has been marked as a duplicate of bug 245370 ***