Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200104 - sys-auth/libnss-pgsql - get rid of "Could not connect to database" as normal user
Summary: sys-auth/libnss-pgsql - get rid of "Could not connect to database" as normal ...
Status: VERIFIED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-23 19:09 UTC by Thorsten Meinl
Modified: 2010-03-11 21:02 UTC (History)
1 user (show)

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


Attachments
Patch to solve the describe issue (libnss-pgsql-1.4.0-shadow-nonroot.patch,648 bytes, patch)
2007-11-23 19:11 UTC, Thorsten Meinl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.