Bug 50395 - getpwuid() sometimes fails with nscd - Permission denied for machine.secret?
getpwuid() sometimes fails with nscd - Permission denied for machine.secret?
Status: NEW
Product: UCS
Classification: Unclassified
Component: nscd
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-21 11:54 CEST by Christian Völker
Modified: 2019-11-05 22:24 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.051
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019062821000381
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Völker univentionstaff 2019-10-21 11:54:49 CEST
Customer uses a php function to get the home-path for a user:

$aUser = (posix_getpwuid(posix_geteuid()));

Sometimes it seems nscd is very busy and therefore does not reply with the needed information of the user:
posix_getpwuid()

PHP-Fehlermeldung:
EUID: 8869 User: 1 LAST POSIX ERROR: 13: Permission denied
Comment 1 Philipp Hahn univentionstaff 2019-10-21 17:01:10 CEST
We use `nscd` by default as /etc/machine.secret is not readable by world.

The "work-around" to make the credentials readable by anyone only sometimes worked.
Comment 2 Arvid Requate univentionstaff 2019-11-05 22:24:30 CET
Quick ideas: https://docs.software-univention.de/performance-guide-4.4.html#nscd

ucr search nscd/passwd* nscd/threads