Bug 1367279 - SELinux is preventing systemd from 'getattr' accesses on the file /.swapfile.
Summary: SELinux is preventing systemd from 'getattr' accesses on the file /.swapfile.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:19f1427b65e293eae2f67224dfd...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-16 06:15 UTC by Алексей Смирнов
Modified: 2020-02-04 19:24 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-191.12.fc24
Clone Of:
Environment:
Last Closed: 2016-08-20 21:51:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Алексей Смирнов 2016-08-16 06:15:48 UTC
Description of problem:
SELinux is preventing systemd from 'getattr' accesses on the file /.swapfile.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If необходимо исправить метку.
Стандартная метка для /.swapfile: etc_runtime_t.
Then можно выполнить restorecon.
Do
# /sbin/restorecon -v /.swapfile

*****  Plugin catchall (1.49 confidence) suggests   **************************

If вы считаете, что systemd следует разрешить доступ getattr к .swapfile file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
allow this access for now by executing:
# ausearch -c 'systemd' --raw | audit2allow -M my-systemd
# semodule -X 300 -i my-systemd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                unconfined_u:object_r:swapfile_t:s0
Target Objects                /.swapfile [ file ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.10.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.4-301.fc24.x86_64 #1 SMP Tue
                              Jul 12 11:50:00 UTC 2016 x86_64 x86_64
Alert Count                   33
First Seen                    2016-06-23 06:55:29 MSK
Last Seen                     2016-08-16 09:14:12 MSK
Local ID                      b1a80604-26fd-4e6d-b1da-218f9dc13e98

Raw Audit Messages
type=AVC msg=audit(1471328052.257:264): avc:  denied  { getattr } for  pid=1 comm="systemd" path="/.swapfile" dev="sda1" ino=16 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:swapfile_t:s0 tclass=file permissive=0


Hash: systemd,init_t,swapfile_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-191.10.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.4-301.fc24.x86_64
type:           libreport

Comment 1 Fedora Update System 2016-08-19 00:59:13 UTC
selinux-policy-3.13.1-191.12.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b37e51176b

Comment 2 Fedora Update System 2016-08-20 21:51:29 UTC
selinux-policy-3.13.1-191.12.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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