This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 429549 - SELinux is preventing /usr/libexec/hal-storage-mount (hald_t) "getattr" access to /swapfile (swapfile_t).
SELinux is preventing /usr/libexec/hal-storage-mount (hald_t) "getattr" acces...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
i386 Linux
low Severity low
: rc
: ---
Assigned To: Daniel Walsh
Depends On:
  Show dependency treegraph
Reported: 2008-01-21 10:19 EST by Bill Kriebel
Modified: 2008-05-21 12:06 EDT (History)
0 users

See Also:
Fixed In Version: RHBA-2008-0465
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 12:06:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bill Kriebel 2008-01-21 10:19:52 EST
Description of problem:

Installed CentOS 5.1 w/o swap partition. After installation, created /swapfile
and proceeded iaw man mkswap. Added following to /etc/fstab:
/swapfile               swap                    swap    defaults        0 0

After yum updates, started getting the following message in /var/log/messages on
Jan 20 13:30:50 localhost setroubleshoot:      SELinux is preventing
/usr/libexec/hal-storage-mount (hald_t) "getattr" access to /swapfile
(swapfile_t).      For complete SELinux messages. run sealert -l

Running sealert yields:

    SELinux is preventing /usr/libexec/hal-storage-mount (hald_t) "getattr"
    access to /swapfile (swapfile_t).

Detailed Description
    SELinux denied access requested by /usr/libexec/hal-storage-mount. It is not
    expected that this access is required by /usr/libexec/hal-storage-mount 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. Please file a against this package.

Allowing Access
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for /swapfile, restorecon -v
    /swapfile. There is currently no automatic way to allow this access.
    Instead, you can generate a local policy module to allow this access - see - or you can
    disable SELinux protection entirely for the application. Disabling SELinux
    protection is not recommended. Please file a against this package.
    Changing the "hald_disable_trans" boolean to true will disable SELinux
    protection this application: "setsebool -P hald_disable_trans=1."

    The following command will allow this access:
    setsebool -P hald_disable_trans=1

Additional Information        

Source Context                system_u:system_r:hald_t
Target Context                root:object_r:swapfile_t
Target Objects                /swapfile [ file ]
Affected RPM Packages         hal- [application]
Policy RPM                    selinux-policy-2.4.6-106.el5_1.3
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.disable_trans
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 2.6.18-53.1.4.el5 #1
                              SMP Fri Nov 30 00:45:16 EST 2007 i686 i686
Alert Count                   1
Line Numbers                  

Raw Audit Messages            

avc: denied { getattr } for comm="hal-storage-mou" dev=hda10 egid=0 euid=0
exe="/usr/libexec/hal-storage-mount" exit=-13 fsgid=0 fsuid=0 gid=0 items=0
path="/swapfile" pid=16794 scontext=system_u:system_r:hald_t:s0 sgid=0
subj=system_u:system_r:hald_t:s0 suid=0 tclass=file
tcontext=root:object_r:swapfile_t:s0 tty=(none) uid=0

Version-Release number of selected component (if applicable):

How reproducible:

Every boot.

Steps to Reproduce:
1. boot
Actual results:

Expected results:

Additional info:
Comment 1 Daniel Walsh 2008-01-21 13:39:08 EST
Fixed in /selinux-policy-2.4.6-116.el5	
Comment 2 RHEL Product and Program Management 2008-01-21 13:45:36 EST
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
Comment 7 errata-xmlrpc 2008-05-21 12:06:32 EDT
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.

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