Bug 751193

Summary: SELinux is preventing /usr/sbin/groupmod from 'write' accesses on the file group.
Product: [Fedora] Fedora Reporter: Richard Marko <rmarko>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, jberan, mgrepl, rmarko
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:77f4e377143cd3886d714aabb09fb1210cf9927f3825e856b82ae626dbe6dcb6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-04 17:33:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Richard Marko 2011-11-03 19:59:34 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-7.fc16.x86_64
reason:         SELinux is preventing /usr/sbin/groupmod from 'write' accesses on the file group.
time:           Thu Nov  3 20:58:34 2011

description:
:SELinux is preventing /usr/sbin/groupmod from 'write' accesses on the file group.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow groupmod to have write access on the group file
:Then you need to change the label on group
:Do
:# semanage fcontext -a -t FILE_TYPE 'group'
:where FILE_TYPE is one of the following: groupadd_t, user_cron_spool_t, shadow_t, passwd_file_t, security_t, faillog_t, puppet_tmp_t, lastlog_t, puppet_tmp_t, pcscd_var_run_t, afs_cache_t. 
:Then execute: 
:restorecon -v 'group'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that groupmod should be allowed write access on the group 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 groupmod /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:etc_t:s0
:Target Objects                group [ file ]
:Source                        groupmod
:Source Path                   /usr/sbin/groupmod
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           shadow-utils-4.1.4.3-7.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-46.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.1.0-7.fc16.x86_64 #1 SMP Tue Nov 1
:                              21:10:48 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Thu 03 Nov 2011 08:55:41 PM CET
:Last Seen                     Thu 03 Nov 2011 08:55:41 PM CET
:Local ID                      da80a32a-3fbb-41a5-b5e7-c9bd0594f92a
:
:Raw Audit Messages
:type=AVC msg=audit(1320350141.133:97): avc:  denied  { write } for  pid=3516 comm="groupmod" name="group" dev=dm-1 ino=669898 scontext=unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1320350141.133:97): arch=x86_64 syscall=open success=no exit=EACCES a0=60c3c0 a1=2 a2=1b6 a3=7fff5cf32080 items=0 ppid=3510 pid=3516 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm=groupmod exe=/usr/sbin/groupmod subj=unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: groupmod,groupadd_t,etc_t,file,write
:
:audit2allow
:
:#============= groupadd_t ==============
:allow groupadd_t etc_t:file write;
:
:audit2allow -R
:
:#============= groupadd_t ==============
:allow groupadd_t etc_t:file write;
:

Comment 1 Miroslav Grepl 2011-11-04 13:10:59 UTC
What does

# sesearch -AC -s groupadd_t -t etc_t -c file -p write

Comment 2 Richard Marko 2011-11-04 13:18:28 UTC
It's empty

Comment 3 Miroslav Grepl 2011-11-04 13:23:29 UTC
Could you try to grab the latest F16 poicy from koji and make sure nothing blows up on install?

Comment 4 Daniel Walsh 2011-11-04 17:33:28 UTC
restorecon -R -v /etc

/etc/group should be labeled passwd_file_t.

Comment 5 Miroslav Grepl 2011-11-04 17:46:15 UTC
I guess, this is F16. Or bad upgraded system.

Comment 6 Daniel Walsh 2011-11-04 18:17:43 UTC
Yes although it looks like F16?