| Summary: | sys-libs/ncurses-5.7 tries to open databases which do not exist and doesn't handle this gracefully | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Heiko Wundram <heiko> |
| Component: | [OLD] Library | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | major | CC: | jarausch, Sergiy.Borodych |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
same here ~amd64 *** This bug has been marked as a duplicate of bug 245370 *** |
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