Bug 1425352

Summary: systemctl start custodia.socket fails
Product: [Fedora] Fedora Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: custodiaAssignee: Simo Sorce <ssorce>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: cheimes, jpazdziora, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 12:07:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1323470    
Bug Blocks:    

Description Jan Pazdziora (Red Hat) 2017-02-21 09:30:38 UTC
Description of problem:

Attempt to start custodia with systemctl start custodia.socket fails.

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

custodia-0.2.0-3.fc26.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. dnf install custodia
2. systemctl start custodia.socket

Actual results:

Job for custodia.socket failed.
See "systemctl status custodia.socket" and "journalctl -xe" for details.

systemctl status custodia.socket says

systemd[1]: custodia.socket: Failed to listen on sockets: Permission denied
systemd[1]: Failed to listen on Custodia Socket.

Expected results:

No error.

Additional info:

The issues is caused by missing SELinux policy for custodia:

avc:  denied  { create } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=0

In permissive, the full AVC denial list is

type=AVC msg=audit(1487669408.249:937): avc:  denied  { create } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1487669408.250:938): avc:  denied  { setopt } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1487669408.250:939): avc:  denied  { bind } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1487669408.250:940): avc:  denied  { listen } for  pid=1 comm="systemd" path="/run/custodia/custodia.sock" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=1

Comment 1 Christian Heimes 2017-02-21 09:53:59 UTC
Custodia has no SELinux type or rules yet, see BZ #1323470

Comment 2 Jan Pazdziora (Red Hat) 2017-02-22 09:05:10 UTC
Bug 1323470 is RHEL bug, this one is Fedora. So it looks like we need the policy to be updated urgently.

Comment 3 Fedora End Of Life 2017-02-28 12:24:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 4 Fedora End Of Life 2018-05-03 08:45:24 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 EOL if it remains open with a Fedora  'version'
of '26'.

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.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 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  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

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.

Comment 5 Jan Pazdziora (Red Hat) 2018-05-10 09:15:27 UTC
On Fedora 27 with

# rpm -qf /usr/lib/systemd/system/custodia@.socket
custodia-0.5.0-9.fc27.noarch

I no longer see

systemctl start custodia

failing. How was the issue addressed exactly?

Comment 6 Fedora End Of Life 2018-05-29 12:07:11 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Simo Sorce 2018-07-23 11:10:27 UTC
silence "[Red Hat Bugzilla] Your Outstanding Requests" on closed bug