Bug 1459374 - SELinux is preventing systemd-machine from using the 'signal' accesses on a process.
Summary: SELinux is preventing systemd-machine from using the 'signal' accesses on a p...
Keywords:
Status: CLOSED DUPLICATE of bug 1372644
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:03f0dd4ff3e51cf40a6245bf958...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-07 00:58 UTC by John P Masseria
Modified: 2017-06-07 01:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-07 01:10:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John P Masseria 2017-06-07 00:58:14 UTC
Description of problem:
Tried to use machinectl command to shutdown running container using the following command:

sudo machinectl poweroff ubuntu_zesty_1704
SELinux is preventing systemd-machine from using the 'signal' accesses on a process.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-machine should be allowed signal access on processes labeled unconfined_t 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:
# ausearch -c 'systemd-machine' --raw | audit2allow -M my-systemdmachine
# semodule -X 300 -i my-systemdmachine.pp

Additional Information:
Source Context                system_u:system_r:systemd_machined_t:s0
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                Unknown [ process ]
Source                        systemd-machine
Source Path                   systemd-machine
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.6.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.9.8-201.fc25.x86_64 #1 SMP Tue
                              Feb 7 11:28:07 UTC 2017 x86_64 x86_64
Alert Count                   2
First Seen                    2017-06-06 20:47:51 EDT
Last Seen                     2017-06-06 20:47:54 EDT
Local ID                      1945f8c5-70fa-4426-a997-686207a8e744

Raw Audit Messages
type=AVC msg=audit(1496796474.103:4796): avc:  denied  { signal } for  pid=18628 comm="systemd-machine" scontext=system_u:system_r:systemd_machined_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=0


Hash: systemd-machine,systemd_machined_t,unconfined_t,process,signal

Version-Release number of selected component:
selinux-policy-3.13.1-225.6.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.8-201.fc25.x86_64
type:           libreport

Potential duplicate: bug 1372644

Comment 1 John P Masseria 2017-06-07 01:05:57 UTC
The following command resolved the problem:

sudo semodule -i my-systemdmachine.pp


systemdmachine.pp contained:

    module my-systemdmachine 1.0;

    require {
            type systemd_machined_t;
            type unconfined_t;
            class process signal;
    }

    #============= systemd_machined_t ==============
    allow systemd_machined_t unconfined_t:process signal;

Comment 2 John P Masseria 2017-06-07 01:10:19 UTC

*** This bug has been marked as a duplicate of bug 1372644 ***


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