Bug 995097 - oddjob-mkhomedir creates directories with bad permissions by default
Summary: oddjob-mkhomedir creates directories with bad permissions by default
Alias: None
Product: Fedora
Classification: Fedora
Component: oddjob
Version: 19
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-08-08 14:24 UTC by Stef Walter
Modified: 2015-02-18 11:13 UTC (History)
3 users (show)

Fixed In Version: oddjob-0.33-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-18 11:13:26 UTC
Type: Bug

Attachments (Terms of Use)

Description Stef Walter 2013-08-08 14:24:23 UTC
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.qe localhost
Bender-admin.q@localhost's password: 
Creating home directory for Bender-admin.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 14:34:47 UTC
<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 14:37:40 UTC
(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 15:02:05 UTC
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 21:15:30 UTC
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 22:35:21 UTC
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 11:13:26 UTC
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.