Bug 427517 - running `oddjob_request mkhomedirfor $user` causes AVC denial
running `oddjob_request mkhomedirfor $user` causes AVC denial
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
5.2
All Linux
medium Severity high
: rc
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-04 06:39 EST by Michal Nowak
Modified: 2013-03-07 21:03 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2008-0465
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 12:06:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2008-01-04 06:39:18 EST
Description of problem:

running `oddjob_request mkhomedirfor testuser` on non x86-64 machine causes AVD
denial messages. 

Version-Release number of selected component (if applicable):

oddjob-devel-0.27-9.el5.ia64
oddjob-debuginfo-0.27-9.el5.ia64
oddjob-libs-0.27-9.el5.ia64
oddjob-0.27-9.el5.ia64


How reproducible:
always

Steps to Reproduce:
install oddjob
/sbin/service oddjobd restart
/sbin/service messagebus restart
useradd testuser
rm -rf /home/testuser
oddjob_request mkhomedirfor testuser 
  
Actual results:
no dir testuser/ was made in /home

Expected results:
dir testuser/ was made in /home

Additional info:

.qa.[root@ia64-5-1server tps]# ls -laZ /home/
drwxr-xr-x  root    root    system_u:object_r:root_t         .
drwxr-xr-x  root    root    system_u:object_r:root_t         ..
drwxr-xr-x  root    root    system_u:object_r:root_t         boston
drwxr-xr-x  root    root    system_u:object_r:root_t         devel
drwx------  rescuer rescuer user_u:object_r:user_home_dir_t  rescuer


.qa.[root@ia64-5-1server tps]# ausearch -m avc -ts recent
----
time->Fri Jan  4 06:33:17 2008
type=SYSCALL msg=audit(1199446397.259:50807): arch=c0000032 syscall=1028
success=no exit=-13 a0=2000000000097b60 a1=0 a2=0 a3=4000000000000838 items=0
ppid=25370 pid=5917 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
fsgid=0 tty=(none) comm="mkhomedir" exe="/usr/lib/oddjob/mkhomedir"
subj=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1199446397.259:50807): avc:  denied  { read } for  pid=5917
comm="mkhomedir" name="filesystems" dev=proc ino=4026531844
scontext=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
tcontext=system_u:object_r:proc_t:s0 tclass=file
----
time->Fri Jan  4 06:33:17 2008
type=SYSCALL msg=audit(1199446397.259:50808): arch=c0000032 syscall=1055
success=no exit=-13 a0=60000ffffe789768 a1=41ed a2=40000000000065f0
a3=c00000000000048c items=0 ppid=25370 pid=5917 auid=0 uid=0 gid=0 euid=0 suid=0
fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) comm="mkhomedir"
exe="/usr/lib/oddjob/mkhomedir"
subj=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1199446397.259:50808): avc:  denied  { create } for  pid=5917
comm="mkhomedir" name="tulpas"
scontext=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
tcontext=root:object_r:root_t:s0 tclass=dir
----
time->Fri Jan  4 06:33:17 2008
type=SYSCALL msg=audit(1199446397.259:50809): arch=c0000032 syscall=1028
success=no exit=-13 a0=2000000000097b60 a1=0 a2=0 a3=0 items=0 ppid=25370
pid=5917 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
tty=(none) comm="mkhomedir" exe="/usr/lib/oddjob/mkhomedir"
subj=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1199446397.259:50809): avc:  denied  { read } for  pid=5917
comm="mkhomedir" name="filesystems" dev=proc ino=4026531844
scontext=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
tcontext=system_u:object_r:proc_t:s0 tclass=file
----
time->Fri Jan  4 06:33:17 2008
type=SYSCALL msg=audit(1199446397.260:50810): arch=c0000032 syscall=1190
success=no exit=-13 a0=1 a1=2 a2=0 a3=600000000000ea00 items=0 ppid=25370
pid=5917 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
tty=(none) comm="mkhomedir" exe="/usr/lib/oddjob/mkhomedir"
subj=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1199446397.260:50810): avc:  denied  { create } for  pid=5917
comm="mkhomedir" scontext=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
tcontext=root:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 tclass=unix_dgram_socket
Comment 2 Daniel Walsh 2008-01-04 12:26:05 EST
First you /home directories are mislabled.

restorecon -R -v /home

oddjob policy is fixed in 

selinux-policy-2.4.6-109.el5.src.rpm
Comment 4 Michal Nowak 2008-01-05 08:08:37 EST
I fixed the labeling in /home.

Plese, where do I get the new selinux-policy? Not in Brew ATM.
Comment 8 Daniel Walsh 2008-01-08 14:34:29 EST
selinux-policy-2.4.6-110.el5.src.rpm should be in brew.
Comment 9 Michal Nowak 2008-01-09 14:51:02 EST
Thanks Dan for quick fix and build.

Tested the fix and the oddjob behaves now correctly. 
Comment 10 Eduard Benes 2008-02-14 10:25:09 EST
Michak, the latest policy is usually availble at the link below. Anyway, thanks 
for your testing.

 http://people.redhat.com/dwalsh/SELinux/RHEL5/noarch/
Comment 13 errata-xmlrpc 2008-05-21 12:06:30 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0465.html

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