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

Bug 200104

Summary: sys-auth/libnss-pgsql - get rid of "Could not connect to database" as normal user
Product: Gentoo Linux Reporter: Thorsten Meinl <Thorsten>
Component: [OLD] Core systemAssignee: PgSQL Bugs <pgsql-bugs>
Severity: enhancement CC: flameeyes
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: Patch to solve the describe issue

Description Thorsten Meinl 2007-11-23 19:09:32 UTC
Current behaviour:
Using some command, e.g. screen, on a system using libnss-pgsql as normal user gives me "Could not connect to database". Tracking down this message I found it comes from trying to access the shadow database which is of course not possible as a normal user cannot read /etc/nss-pgsql-root.conf and thus cannot connect to the database. The error message is a bit annoying as it is actually not error at all.

Expected behaviour:
Do not print a warning if a normal user tries to access the shadow database

Suggested patch:
See attachment: just check if the reason why opening the config file failed is EACCES and immediately return.

Reproducible: Always

Steps to Reproduce:
1. make use of libnss-pgsql for both passwd and shadow
2. issue screen as normal user
Comment 1 Thorsten Meinl 2007-11-23 19:11:10 UTC
Created attachment 136791 [details, diff]
Patch to solve the describe issue
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-03-10 15:01:01 UTC
Can you please report this upstream, if it's still a problem with 1.5.0?
Comment 3 Thorsten Meinl 2010-03-11 21:02:50 UTC
I haven't tried it out yet (production system) but judging from the CVS diff this problem was address in released 1.5.0 beta.