Bug 1123860
| Summary: | enablemkhomedir uses wrong security mask | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Marc Muehlfeld <muehlfeld> | ||||||||
| Component: | oddjob | Assignee: | Nalin Dahyabhai <nalin> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Patrik Kis <pkis> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 7.0 | CC: | dpal, kfiresmith, marc.muehlfeld, pkis | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | oddjob-0.31.5-4.el7 | Doc Type: | Bug Fix | ||||||||
| Doc Text: |
Cause: The default configuration for oddjob's mkhomedir helper specified that a umask of 002 be used when populating a user's home directory.
Consequence: Changes to the UMASK setting in the /etc/login.defs configuration file would not be honored.
Fix: The oddjob daemon's configuration no longer specifies that a umask value be passed to the mkhomedir helper when it is invoked.
Result: The oddjob mkhomedir helper uses a umask value read from the UMASK setting from the /etc/login.defs file.
|
Story Points: | --- | ||||||||
| Clone Of: | |||||||||||
| : | 1150607 (view as bug list) | Environment: | |||||||||
| Last Closed: | 2015-03-05 10:08:11 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 1150607 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Marc Muehlfeld
2014-07-28 13:40:21 UTC
As in bug #995097, does removing the part of /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf that passes a umask (via a -u parameter) to the helper resolve this? Because we can absolutely do that. Created attachment 934297 [details] Error message during login (In reply to Nalin Dahyabhai from comment #2) > As in bug #995097, does removing the part of > /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf that passes a umask (via a -u > parameter) to the helper resolve this? Because we can absolutely do that. No. If I delete this file, there's shown an error for a second after I entered the password. And after the authentication, there's a second error and then I got logged out again (and the home wasn't created). Created attachment 934298 [details]
Error after login
Created attachment 934299 [details]
messages and secure log from the login try
(In reply to Marc Muehlfeld from comment #3) > Created attachment 934297 [details] > Error message during login > > (In reply to Nalin Dahyabhai from comment #2) > > As in bug #995097, does removing the part of > > /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf that passes a umask (via a -u > > parameter) to the helper resolve this? Because we can absolutely do that. > > No. > > If I delete this file, there's shown an error for a second after I entered > the password. And after the authentication, there's a second error and then > I got logged out again (and the home wasn't created). I'm sorry I wasn't clearer - I meant removing the -u flag from the configuration for the helper, not the entire file. The file's contents should change from: ============================================================================== <?xml version="1.0"?> <!-- This configuration file snippet controls the oddjob daemon. It provides access to mkhomedir functionality via a service named "com.redhat.oddjob_mkhomedir", which exposes a single object ("/"). The object allows the root user to call any of the standard D-Bus introspection interface's methods (these are implemented by oddjobd itself), and also defines an interface named "com.redhat.oddjob_mkhomedir", which provides two methods. --> <oddjobconfig> <service name="com.redhat.oddjob_mkhomedir"> <object name="/"> <interface name="org.freedesktop.DBus.Introspectable"> <allow min_uid="0" max_uid="0"/> <!-- <method name="Introspect"/> --> </interface> <interface name="com.redhat.oddjob_mkhomedir"> <method name="mkmyhomedir"> <helper exec="/usr/libexec/oddjob/mkhomedir -u 0002" arguments="0" prepend_user_name="yes"/> <!-- no acl entries -> not allowed for anyone --> </method> <method name="mkhomedirfor"> <helper exec="/usr/libexec/oddjob/mkhomedir -u 0002" arguments="1"/> <allow user="root"/> </method> </interface> </object> </service> </oddjobconfig> ============================================================================== to: ============================================================================== <?xml version="1.0"?> <!-- This configuration file snippet controls the oddjob daemon. It provides access to mkhomedir functionality via a service named "com.redhat.oddjob_mkhomedir", which exposes a single object ("/"). The object allows the root user to call any of the standard D-Bus introspection interface's methods (these are implemented by oddjobd itself), and also defines an interface named "com.redhat.oddjob_mkhomedir", which provides two methods. --> <oddjobconfig> <service name="com.redhat.oddjob_mkhomedir"> <object name="/"> <interface name="org.freedesktop.DBus.Introspectable"> <allow min_uid="0" max_uid="0"/> <!-- <method name="Introspect"/> --> </interface> <interface name="com.redhat.oddjob_mkhomedir"> <method name="mkmyhomedir"> <helper exec="/usr/libexec/oddjob/mkhomedir" arguments="0" prepend_user_name="yes"/> <!-- no acl entries -> not allowed for anyone --> </method> <method name="mkhomedirfor"> <helper exec="/usr/libexec/oddjob/mkhomedir" arguments="1"/> <allow user="root"/> </method> </interface> </object> </service> </oddjobconfig> ============================================================================== After the change, the <helper> node should no longer be configured to pass a umask value to the helper, allowing it to read the configured value from /etc/login.defs, which by default matches the value you prefer. (In reply to Nalin Dahyabhai from comment #6) > I'm sorry I wasn't clearer - I meant removing the -u flag from the > configuration for the helper, not the entire file. Ups. Sorry. :-) If I remove the '-u 0002', then the created home directory gets permission 700. So this would help. Great! We'll do that, then. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0446.html |