Bug 846174 - beanstalkd rpm installation incomplete due to useradd selinux denial
beanstalkd rpm installation incomplete due to useradd selinux denial
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: beanstalkd (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeremy Hinegardner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-06 23:07 EDT by Raman Gupta
Modified: 2013-02-13 09:56 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-13 09:56:12 EST
Type: Bug
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 Raman Gupta 2012-08-06 23:07:34 EDT
During the install of RPM package beanstalkd-1.4.6-4.fc16.x86_64, SELinux denies the creation of a user. I don't know if this is a problem with the selinux policy or with the beanstalkd rpm.


SELinux is preventing /usr/sbin/useradd from 'write' accesses on the directory /var/lib.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow useradd to have write access on the lib directory
Then you need to change the label on /var/lib
Do
# semanage fcontext -a -t FILE_TYPE '/var/lib'
where FILE_TYPE is one of the following: user_home_type, semanage_tmp_t, pcscd_var_run_t, file_context_t, home_root_t, selinux_config_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, tmp_t, etc_t, semanage_store_t, httpd_user_script_exec_type. 
Then execute: 
restorecon -v '/var/lib'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that useradd should be allowed write access on the lib 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 useradd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:useradd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                /var/lib [ dir ]
Source                        useradd
Source Path                   /usr/sbin/useradd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           shadow-utils-4.1.4.3-13.fc16.x86_64
Target RPM Packages           filesystem-2.4.44-1.fc16.x86_64
Policy RPM                    selinux-policy-3.10.0-90.fc16.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux edison 3.4.6-1.fc16.x86_64 #1 SMP Fri Jul 20
                              12:58:04 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    Mon 06 Aug 2012 10:53:08 PM EDT
Last Seen                     Mon 06 Aug 2012 10:53:08 PM EDT
Local ID                      3dc1a735-f83f-4e1a-9db1-9c0d8be02f5f

Raw Audit Messages
type=AVC msg=audit(1344307988.764:14173): avc:  denied  { write } for  pid=14098 comm="useradd" name="lib" dev="dm-2" ino=11403265 scontext=unconfined_u:system_r:useradd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir


type=SYSCALL msg=audit(1344307988.764:14173): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fffecc7d760 a1=0 a2=0 a3=65726373662f7274 items=0 ppid=14096 pid=14098 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm=useradd exe=/usr/sbin/useradd subj=unconfined_u:system_r:useradd_t:s0-s0:c0.c1023 key=(null)

Hash: useradd,useradd_t,var_lib_t,dir,write

audit2allow

#============= useradd_t ==============
#!!!! The source type 'useradd_t' can write to a 'dir' of the following types:
# user_home_type, semanage_tmp_t, pcscd_var_run_t, file_context_t, home_root_t, selinux_config_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, tmp_t, etc_t, semanage_store_t, httpd_user_script_exec_type

allow useradd_t var_lib_t:dir write;

audit2allow -R

#============= useradd_t ==============
#!!!! The source type 'useradd_t' can write to a 'dir' of the following types:
# user_home_type, semanage_tmp_t, pcscd_var_run_t, file_context_t, home_root_t, selinux_config_t, user_home_dir_t, default_context_t, httpd_user_content_type, mail_spool_t, tmp_t, etc_t, semanage_store_t, httpd_user_script_exec_type

allow useradd_t var_lib_t:dir write;
Comment 1 Fedora End Of Life 2013-01-16 08:59:29 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. 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 '16'.

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 16'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 16 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 to click on 
"Clone This Bug" and open it against that version of Fedora.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Fedora End Of Life 2013-02-13 09:56:15 EST
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 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.