Bug 923490 - SELinux is preventing /usr/sbin/useradd from 'setattr' accesses on the file passwd-.
Summary: SELinux is preventing /usr/sbin/useradd from 'setattr' accesses on the file p...
Keywords:
Status: CLOSED DUPLICATE of bug 923497
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:38fdf8492164b67028e3c1d4674...
Depends On:
Blocks: F19Blocker, F19FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2013-03-20 00:13 UTC by Adam Williamson
Modified: 2013-03-20 00:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-20 00:37:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2013-03-20 00:13:22 UTC
Description of problem:
Occurs on boot of a Fedora 19 live image built from current repositories.
SELinux is preventing /usr/sbin/useradd from 'setattr' accesses on the file passwd-.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that useradd should be allowed setattr access on the passwd- file 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 useradd /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                unconfined_u:object_r:net_conf_t:s0
Target Objects                passwd- [ file ]
Source                        useradd
Source Path                   /usr/sbin/useradd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           shadow-utils-4.1.5.1-4.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-22.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.0-0.rc3.git0.3.fc19.x86_64 #1
                              SMP Mon Mar 18 21:39:31 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-03-19 19:39:22 EDT
Last Seen                     2013-03-19 19:39:22 EDT
Local ID                      bae44877-bcab-481d-97c4-efd2f9701074

Raw Audit Messages
type=AVC msg=audit(1363736362.933:44): avc:  denied  { setattr } for  pid=678 comm="useradd" name="passwd-" dev="dm-0" ino=151490 scontext=system_u:system_r:useradd_t:s0 tcontext=unconfined_u:object_r:net_conf_t:s0 tclass=file


type=SYSCALL msg=audit(1363736362.933:44): arch=x86_64 syscall=fchown success=yes exit=0 a0=a a1=0 a2=0 a3=1 items=0 ppid=553 pid=678 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=useradd exe=/usr/sbin/useradd subj=system_u:system_r:useradd_t:s0 key=(null)

Hash: useradd,useradd_t,net_conf_t,file,setattr

audit2allow

#============= useradd_t ==============
allow useradd_t net_conf_t:file setattr;

audit2allow -R
require {
	type useradd_t;
}

#============= useradd_t ==============
sysnet_setattr_config(useradd_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc3.git0.3.fc19.x86_64
type:           libreport

Comment 1 Adam Williamson 2013-03-20 00:13:36 UTC
Final blocker: "In most cases, there must be no SELinux 'AVC: denied' messages or abrt crash notifications on initial boot and subsequent login"

Comment 2 Adam Williamson 2013-03-20 00:15:11 UTC
There's also a "/usr/sbin/useradd write passwd-".

Comment 3 Daniel Walsh 2013-03-20 00:37:42 UTC

*** This bug has been marked as a duplicate of bug 923497 ***


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