Bug 447096 - Missing SELinux policy for pam_mkhomedir
Summary: Missing SELinux policy for pam_mkhomedir
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: oddjob
Version: 11
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-17 20:56 UTC by Javier Palacios
Modified: 2010-06-28 10:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 10:37:07 UTC


Attachments (Terms of Use)

Description Javier Palacios 2008-05-17 20:56:18 UTC
It looks like selinux does not have proper policies for mkhomedir.


I have created local users without homedir, duplicating on /etc/passwd & shadow
the entry for an existing user changing the uid number and homedir itself.
Setting selinux to permissive mode and attempting different type of logins (
console, ssh , graphical), policies generated with audit2allow show entries like
the ones shown below.

Moreover, the gdm login gets hang, and shows other entries related to sbus. The
hang occurs even with permissive selinux, but after a non-graphics login, the
user can use gdm normally.


#============= local_login_t ==============
allow local_login_t home_root_t:dir { write create add_name setattr };
allow local_login_t home_root_t:file { write create setattr };

#============= sshd_t ==============
allow sshd_t home_root_t:dir { write create add_name setattr };
allow sshd_t home_root_t:file { write create setattr };

#============= xdm_t ==============
allow xdm_t admin_home_t:dir remove_name;
allow xdm_t admin_home_t:file rename;

Comment 1 Javier Palacios 2008-06-06 19:46:28 UTC
The gdm problem (reported on bug 448237) is solved with an updated gdm package

Comment 2 Javier Palacios 2008-06-07 09:56:46 UTC
To achive complete functionality on graphical logins, I needed to increase the
policy

#============= xdm_t ==============
allow xdm_t home_root_t:dir { write create remove_name add_name setattr };
allow xdm_t home_root_t:file { rename write getattr setattr read create append
unlink };


Comment 3 Daniel Walsh 2008-06-10 20:10:22 UTC
Could you attempt to do this with oddjob_mkhomedir instead.  We think this is a
better solution.

Comment 4 Javier Palacios 2008-06-11 08:19:15 UTC
I've never heard about oddjob, but as far as I see is a DBUS service, so it
might not work for console/ssh logins, and might not be even available on
reduced installs.

If the proper way is to use oddjob, then the authconfig command should do that
instead of using standard pam_mkhomedir. Anyway, the issue with gdm logins is
mostly solved with updated packages.

Comment 5 Daniel Walsh 2008-06-11 12:50:33 UTC
It works with ssh and console logins.  

The goal is to not give login programs/pam programs that much control over
creation/manipulation of home directories.  A separate program like oddjob
(oddjob_mkhomedirs) gives us good separation, and thus better security.

Tomas what do you think about making the change to authconfig?

Comment 6 Tomas Mraz 2008-06-11 13:34:20 UTC
I a(In reply to comment #4)
> I've never heard about oddjob, but as far as I see is a DBUS service, so it
> might not work for console/ssh logins, and might not be even available on
> reduced installs.
The oddjob-mkhomedir package is required to be installed and the oddjobd daemon
has to be running for pam_oddjob_mkhomedir to work. Authconfig can setup oddjobd
to run by calling chkconfig. It of course also requires running dbus system bus,
but this is currently required also by many other things on Fedora so that might
not be of a concern.

> If the proper way is to use oddjob, then the authconfig command should do that
> instead of using standard pam_mkhomedir. Anyway, the issue with gdm logins is
> mostly solved with updated packages.

The other possible way would be to modify pam_mkhomedir to call a helper binary
itself. This binary could be shared with pam_namespace which also can do
creation of the polyinstantiated directories on demand.


Comment 7 Javier Palacios 2008-06-15 17:17:15 UTC
I've performed a minimal install (core+base), installed oddjob_mkhomedir and
added the entry in /etc/pam.d/system-auth as shown on manpage.

As oddjob is not automatically started, if I try to login I get the message
org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.oddjob_mkhomedir
was not provided by any .service files

But after starting it, I still get an error, and the home directory is not created
com.redhat.oddjob.Error.NoInterface: com.redhat.oddjob_mkhomedir

Comment 8 Javier Palacios 2008-06-15 17:19:01 UTC
An issue not related to this ticket, but that should be probably dispatched for
a proper way. There are at least two official mirrors (sunsite.rediris.es and
ftp.cica.es) where the oddjob packages are not available on the install tree nor
in the updates one.

Comment 9 Javier Palacios 2008-06-15 18:46:33 UTC
The problem is neither solved with a more complete install.
The NoInterface error persists on console logins, and if I attempt a graphical
login, the login fails, and I get back the initial gdm userlist screen. That
happens both with install-time and updated gdm packages, and the behaviour is
different from the hang described on bug 448237.

Comment 10 Bug Zapper 2010-04-27 12:03:39 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

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 prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Bug Zapper 2010-06-28 10:37:07 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 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.

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.