Bug 238751

Summary: SELinux is preventing /usr/sbin/useradd (useradd_t) "read write" to faillog (var_log_t).
Product: Red Hat Enterprise Linux 5 Reporter: Scott Bambrough <scottb>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: dwalsh, ebenes, mmalik
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0544 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 16:39:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Bambrough 2007-05-02 19:42:36 UTC
Summary
    SELinux is preventing /usr/sbin/useradd (useradd_t) "read write" to faillog
    (var_log_t).

Detailed Description
    SELinux denied access requested by /usr/sbin/useradd. It is not expected
    that this access is required by /usr/sbin/useradd and this access may signal
    an intrusion attempt. It is also possible that the specific version or
    configuration of the application is causing it to require additional access.

Allowing Access
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for faillog, restorecon -v faillog
    If this does not work, there is currently no automatic way to allow this
    access. Instead,  you can generate a local policy module to allow this
    access - see http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385 Or you
    can disable SELinux protection altogether. Disabling SELinux protection is
    not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Additional Information        

Source Context                root:system_r:useradd_t:SystemLow-SystemHigh
Target Context                system_u:object_r:var_log_t
Target Objects                faillog [ file ]
Affected RPM Packages         shadow-utils-4.0.17-12.el5 [application]
Policy RPM                    selinux-policy-2.4.6-30.el5
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 2.6.18-8.el5 #1 SMP
                              Fri Jan 26 14:15:21 EST 2007 i686 athlon
Alert Count                   2
Line Numbers                  

Raw Audit Messages            

avc: denied { read, write } for comm="useradd" dev=dm-0 egid=0 euid=0
exe="/usr/sbin/useradd" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="faillog"
pid=5364 scontext=root:system_r:useradd_t:s0-s0:c0.c1023 sgid=0
subj=root:system_r:useradd_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:var_log_t:s0 tty=pts2 uid=0

I get this error installing Xandros Bridgeways on RHEL5 (no updates) in a VMware
image.

Comment 1 Daniel Walsh 2007-05-03 13:39:11 UTC
restorecon -R -v /var/log  will fix.  This is in the release notes and will be
fixed in u1.

Comment 3 RHEL Program Management 2007-05-18 16:24:17 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 errata-xmlrpc 2007-11-07 16:39:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0544.html