Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675308 - context for run files are not set properly
Summary: context for run files are not set properly
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-13 07:40 UTC by Vilgot Fredenberg
Modified: 2019-01-13 07:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Restorecon -RFv /run output (file_675308.txt,1.66 KB, text/plain)
2019-01-13 07:40 UTC, Vilgot Fredenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vilgot Fredenberg 2019-01-13 07:40:30 UTC
Created attachment 560822 [details]
Restorecon -RFv /run output

After manually restarting a service as unconfined_u sockets and pids in /run get labelled as unconfined_u instead of system_u.

This causes problems when for example fail2bans logs are rotated through logrotate since when fail2ban connect to its socket it gets denied because fail2ban_client_t can't connect to unconfined_t unix sockets (see log).

type=AVC msg=audit(1547354761.514:149): avc:  denied  { connectto } for  pid=24664 comm="fail2ban-client" path="/run/fail2ban/fail2ban.sock" scontext=system_u:system_r:fail2ban_client_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket permissive=0

Doing restorecon on /run relabelled  a lot of things, so this isn't just relevant to the fail2ban policy.