Bug 848360 - SELinux is preventing /usr/sbin/useradd from 'rename' accesses on the file /etc/default/useradd.
SELinux is preventing /usr/sbin/useradd from 'rename' accesses on the file /e...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
abrt_hash:b66ba32f47f3b0aa8f2cc2b6df7...
: SELinux
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 07:48 EDT by Nils Philippsen
Modified: 2013-08-01 08:38 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 08:38:26 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 Nils Philippsen 2012-08-15 07:48:37 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.5.0-2.fc17.x86_64
time:           Wed 15 Aug 2012 01:47:55 PM CEST

description:
:SELinux is preventing /usr/sbin/useradd from 'rename' accesses on the file /etc/default/useradd.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow useradd to have rename access on the useradd file
:Then you need to change the label on /etc/default/useradd
:Do
:# semanage fcontext -a -t FILE_TYPE '/etc/default/useradd'
:where FILE_TYPE is one of the following: pcscd_var_run_t, file_context_t, selinux_config_t, default_context_t, httpd_user_content_type, mail_spool_t, shadow_t, semanage_store_t, httpd_user_script_exec_type, passwd_file_t, user_home_type, semanage_tmp_t. 
:Then execute: 
:restorecon -v '/etc/default/useradd'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that useradd should be allowed rename access on the useradd 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                unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:etc_t:s0
:Target Objects                /etc/default/useradd [ file ]
:Source                        useradd
:Source Path                   /usr/sbin/useradd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           shadow-utils-4.1.4.3-14.fc17.x86_64
:Target RPM Packages           shadow-utils-4.1.4.3-14.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-142.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.0-2.fc17.x86_64 #1 SMP Mon Jul
:                              30 14:48:59 UTC 2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    Wed 15 Aug 2012 01:43:33 PM CEST
:Last Seen                     Wed 15 Aug 2012 01:44:49 PM CEST
:Local ID                      41bb35ce-1687-437a-b261-5fcad26f8934
:
:Raw Audit Messages
:type=AVC msg=audit(1345031089.147:4026): avc:  denied  { rename } for  pid=30087 comm="useradd" name="useradd" dev="dm-1" ino=394386 scontext=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1345031089.147:4026): arch=x86_64 syscall=rename success=no exit=EACCES a0=7f63132ef010 a1=7fffcd128d30 a2=7fffcd128d45 a3=7f63130e96ef items=0 ppid=29024 pid=30087 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts11 ses=7 comm=useradd exe=/usr/sbin/useradd subj=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: useradd,useradd_t,etc_t,file,rename
:
:audit2allow
:
:#============= useradd_t ==============
:allow useradd_t etc_t:file rename;
:
:audit2allow -R
:
:#============= useradd_t ==============
:allow useradd_t etc_t:file rename;
:
Comment 1 Daniel Walsh 2012-08-15 08:05:32 EDT
Is useradd command actually supposed to modify /etc/default/useradd?
Comment 2 Tomas Mraz 2012-08-15 08:18:35 EDT
Yes, it is. It will modify them with new defaults if -D is used.
Comment 3 Daniel Walsh 2012-08-15 08:37:38 EDT
Miroslav, I added

files_manage_etc_files(useradd_t)

to Rawhide, need this for all Versions of Policy.
Comment 4 Miroslav Grepl 2012-08-20 04:09:52 EDT
Added.
Comment 5 Fedora End Of Life 2013-07-04 00:05:07 EDT
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.
Comment 6 Fedora End Of Life 2013-08-01 08:38:31 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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.