Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271974 - sys-apps/baselayout-2.0.1 update/reinstall shouldn't change group rights on /etc/shadow
Summary: sys-apps/baselayout-2.0.1 update/reinstall shouldn't change group rights on /...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-31 12:41 UTC by Nils Wisiol
Modified: 2010-01-15 02:44 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 Nils Wisiol 2009-05-31 12:41:20 UTC
If you update/reinstall the baselayout-package (at least version 2.0.1) it changes rights on /etc/shadow to 600. But it can be useful to allow non-root programs to read on /etc/shadow (group set to shadow, rights set to 640), for example mod_auth_pam for apache2. At the moment, upgrading baselayout will cause mod_auth_pam to stop working.

Reproducible: Always

Steps to Reproduce:
1. Set rights to 640: chmod 640 /etc/shadow
2. Update/Reinstall baselayout-2.0.1
3. Look at rights of /etc/shadow: ls -lh /etc/shadow

Actual Results:  
The baselayout package changes fs rights without request.

Expected Results:  
The baselayout package shoudn't change rights without requesting and should give a warning that 640 on /etc/shadow _can_ be a security issue.
Comment 1 Mike Auty (RETIRED) gentoo-dev 2009-06-06 14:23:48 UTC
Removing the privileges was done as part of bug 260993.  It only mentioned removing world readable permissions.  Bug 28114 talks a little about mod_auth_pam, it seems it needs to read shadow directly rather than using PAM to validate passwords...

I'll pass this to the baselayout guys for a judgement call, but if it helps [1] recommends using mod_authnz_external [2] for authenticating against shadow passwords.  Mod_authnz_external's in the tree for apache-2 at least...

[1] http://pam.sourceforge.net/mod_auth_pam/
[2] http://code.google.com/p/mod-auth-external/