Bug 888734 - SELinux is preventing /usr/sbin/userdel from 'rmdir' accesses on the directory root.
Summary: SELinux is preventing /usr/sbin/userdel from 'rmdir' accesses on the director...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:257c1c1af86a1032f1d40886c89...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-19 11:19 UTC by theomaulida
Modified: 2013-07-04 10:25 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-04 10:25:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-12-19 11:19 UTC, theomaulida
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-12-19 11:20 UTC, theomaulida
no flags Details

Description theomaulida 2012-12-19 11:19:22 UTC
Additional info:
libreport version: 2.0.18
kernel:         3.3.4-5.fc17.i686.PAE

description:
:SELinux is preventing /usr/sbin/userdel from 'rmdir' accesses on the directory root.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that userdel should be allowed rmdir access on the root directory by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:Do
:allow this access for now by executing:
:# grep userdel /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:useradd_t:s0
:Target Context                system_u:object_r:tmp_t:s0
:Target Objects                root [ dir ]
:Source                        userdel
:Source Path                   /usr/sbin/userdel
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           shadow-utils-4.1.5-4.fc17.i686
:Target RPM Packages           filesystem-3-2.fc17.i686
:Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.4-5.fc17.i686.PAE #1 SMP Mon
:                              May 7 17:37:39 UTC 2012 i686 i686
:Alert Count                   2
:First Seen                    2012-12-19 18:05:04 WIT
:Last Seen                     2012-12-19 18:05:17 WIT
:Local ID                      21538523-92b3-40c7-9823-ffdf74fbe913
:
:Raw Audit Messages
:type=AVC msg=audit(1355915117.917:69): avc:  denied  { rmdir } for  pid=1222 comm="userdel" name="root" dev="sda7" ino=2490736 scontext=system_u:system_r:useradd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1355915117.917:69): arch=i386 syscall=rmdir success=no exit=EACCES a0=b949f380 a1=0 a2=b77d6dbc a3=0 items=0 ppid=724 pid=1222 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4 comm=userdel exe=/usr/sbin/userdel subj=system_u:system_r:useradd_t:s0 key=(null)
:
:Hash: userdel,useradd_t,tmp_t,dir,rmdir
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 theomaulida 2012-12-19 11:19:58 UTC
Created attachment 666026 [details]
File: type

Comment 2 theomaulida 2012-12-19 11:20:07 UTC
Created attachment 666027 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-12-19 13:39:02 UTC
Any idea why is root dir labeled as tmp_t?

Try to execute

# restorecon -Rv /root

Comment 4 Daniel Walsh 2012-12-19 14:59:58 UTC
Well I hope useradd is not trying to remove /root.  Must be a root directory in a homedir.

Comment 5 Miroslav Grepl 2012-12-20 08:04:37 UTC
Yes, I wanted to wrote

# restorecon -Rv /home/root

Comment 6 Fedora End Of Life 2013-07-04 00:55:01 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 '17'.

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

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.


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