Bug 1903022 - selinux prevents ipsec service to start
Summary: selinux prevents ipsec service to start
Keywords:
Status: CLOSED DUPLICATE of bug 1903154
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 33
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-01 07:11 UTC by Marek Greško
Modified: 2020-12-07 13:24 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-12-03 10:51:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Greško 2020-12-01 07:11:58 UTC
Description of problem:
The ipsec service is unable to start when selinux in enforcing mode. It is complaining about unability to access /var/lib/ipsec/nss/ directory structure.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.14.6-30.fc33.noarch


How reproducible:
By starting ipsec service in enforcing mode.

Steps to Reproduce:
1.
2.
3.

Actual results:
The ipsec service fails to start because of unablility to access /var/lib/ipsec/nss/ directory structure.

Expected results:
The ipsec service starts.

Additional info:

Comment 1 Milos Malik 2020-12-03 09:06:00 UTC
Please collect SELinux denials which appear on your machine and attach them here:

# ausearch -m avc -m user_avc -m selinux_err -i -ts today

Thank you.

Comment 2 Zdenek Pytela 2020-12-03 10:51:47 UTC
The fix will be a part of the next build.

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

Comment 3 Marek Greško 2020-12-07 13:24:27 UTC
----
type=AVC msg=audit(07.12.2020 14:16:42.403:1769) : avc:  denied  { read } for  pid=47178 comm=pluto name=pkcs11.txt dev="dm-2" ino=1788 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07.12.2020 14:16:42.403:1770) : avc:  denied  { open } for  pid=47178 comm=pluto path=/var/lib/ipsec/nss/pkcs11.txt dev="dm-2" ino=1788 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07.12.2020 14:16:42.403:1771) : avc:  denied  { getattr } for  pid=47178 comm=pluto path=/var/lib/ipsec/nss/pkcs11.txt dev="dm-2" ino=1788 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07.12.2020 14:16:42.404:1772) : avc:  denied  { lock } for  pid=47178 comm=pluto path=/var/lib/ipsec/nss/cert9.db dev="dm-2" ino=1786 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=1 

and some unrelated if could be also fixed please:

----
type=AVC msg=audit(07.12.2020 00:00:07.684:1616) : avc:  denied  { read open } for  pid=39384 comm=sh path=/usr/bin/zmpkg.pl dev="dm-1" ino=3146930 scontext=system_u:system_r:logrotate_t:s0 tcontext=system_u:object_r:zoneminder_exec_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07.12.2020 00:00:07.688:1617) : avc:  denied  { ioctl } for  pid=39384 comm=zmpkg.pl path=/usr/bin/zmpkg.pl dev="dm-1" ino=3146930 ioctlcmd=TCGETS scontext=system_u:system_r:logrotate_t:s0 tcontext=system_u:object_r:zoneminder_exec_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07.12.2020 00:00:09.295:1637) : avc:  denied  { write } for  pid=39410 comm=zmdc.pl name=zmdc.sock dev="sdc1" ino=2624939 scontext=system_u:system_r:logrotate_t:s0 tcontext=system_u:object_r:zoneminder_var_lib_t:s0 tclass=sock_file permissive=1 
--------
type=AVC msg=audit(07.12.2020 00:00:09.296:1638) : avc:  denied  { connectto } for  pid=39410 comm=zmdc.pl path=/mnt/zm/sock/zmdc.sock scontext=system_u:system_r:logrotate_t:s0 tcontext=system_u:system_r:zoneminder_t:s0 tclass=unix_stream_socket permissive=1 
----


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