Bug 995097 - oddjob-mkhomedir creates directories with bad permissions by default
oddjob-mkhomedir creates directories with bad permissions by default
Product: Fedora
Classification: Fedora
Component: oddjob (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Nalin Dahyabhai
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-08 10:24 EDT by Stef Walter
Modified: 2015-02-18 06:13 EST (History)
3 users (show)

See Also:
Fixed In Version: oddjob-0.33-1.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-18 06:13:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stef Walter 2013-08-08 10:24:23 EDT
oddjob-mkhomedir creates directories with bad permissions by default. The created home directories are readable by group and world. 

For example:

$ ls -l /home
total 4
drwx------. 3 stef stef 4096 28. Mär 20:41 stef

$ grep -R oddjob /etc/pam.d/system-auth
session     optional      pam_oddjob_mkhomedir.so

$ ssh -l Bender-admin@security.baseos.qe localhost
Bender-admin@security.baseos.q@localhost's password: 
Creating home directory for Bender-admin@security.baseos.qe.
-sh-4.2$ pwd
-sh-4.2$ ls -l /home
total 8
drwxr-xr-x. 3 bender-admin domain users 4096  8. Aug 16:19 bender-admin
drwx------. 3 stef         stef         4096 28. Mär 20:41 stef

Original issue reported here: http://lists.freedesktop.org/archives/authentication/2013-July/000278.html
Comment 1 Stef Walter 2013-08-08 10:34:47 EDT
<fweimer> Ideally, it should read /etc/login.defs and use the UMASK value found there to determine the permission.
Comment 2 Nalin Dahyabhai 2013-08-08 10:37:40 EDT
(In reply to Stef Walter from comment #1)
> <fweimer> Ideally, it should read /etc/login.defs and use the UMASK value
> found there to determine the permission.

Is there a umask specified as an option in your /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf's invocation of the mkhomedir helper?  If there isn't one, it'll do that.
Comment 3 Stef Walter 2013-08-08 11:02:05 EDT
Indeed there is. It looks like the default is broken.

$ rpm -V oddjob-mkhomedir
$ cat /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf | grep mkhomedir
     provides access to mkhomedir functionality via a service named
     "com.redhat.oddjob_mkhomedir", which exposes a single object
     "com.redhat.oddjob_mkhomedir", which provides two methods.  -->
  <service name="com.redhat.oddjob_mkhomedir">
      <interface name="com.redhat.oddjob_mkhomedir">
          <helper exec="/usr/libexec/oddjob/mkhomedir -u 0002"
        <method name="mkhomedirfor">
          <helper exec="/usr/libexec/oddjob/mkhomedir -u 0002"
Comment 4 Stephen Gallagher 2014-02-20 16:15:30 EST
Raising the severity on this. A bad umask on user directory creation can cause a serious information leak.
Comment 5 Fedora End Of Life 2015-01-09 17:35:21 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2015-02-18 06:13:26 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.