Re: label
Casper <[email protected]> Mon, 13 Feb 2023 22:51:40 +0100
| Newsgroups | gmane.linux.redhat.fedora.selinux |
|---|---|
| Message-ID | <[email protected]> |
Henry Zhang a écrit :
> Casper:
> For example, I have a denied message in audit.log:
> type=AVC msg=audit(1676313787.584:376): avc: denied { read write } for pid=17799 comm="run_at_daemon" path="socket:[54386]" dev="sockfs" ino=54386 scontext=system_u:system_r:run_at_csq_daemon_t:s0 tcontext=system_u:system_r:rssi_daemon_t:s0 tclass=tcp_socket permissive=0
>
> how to apply restorecon?
Well this is a TCP socket... not unix file.
For TCP socket, opened at boot or later, label is always good, because
a TCP socket is not persistent.
If you think the "label" ("SELinux context" in this case) of the TCP
socket is not good, you can customize the policy of contexts applied
on opened ports with the semanage command.
For example, I allow port 18000 to have the http_port_t context on my
machine:
semanage port -a -t http_port_t -p tcp 18000
More infos:
man semanage
In your message, your TCP socket got run_at_csq_daemon_t context, but
rssi_daemon_t context is not allowed to access, then SELinux is
blocking access (read write).
--
GnuPG: AE157E0B29F0BEF2 at keys.openpgp.org
CA Cert: https://dl.casperlefantom.net/pub/ssl/root.der
Jabber/XMPP Messaging: [email protected]
_______________________________________________
selinux mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
signature.asc
(application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE----- iQJOBAEBCAA4FiEEcNWpsYTrRfLHoxirrhV+CynwvvIFAmPqsOgaGGh0dHBzOi8v a2V5cy5vcGVucGdwLm9yZy8ACgkQrhV+CynwvvKCBQ//Y2mUEWMKux3qIrbSdiUE 3tM/Y7na++bihxm6MdQzjCZrcmHZij9w4jGVIfQU+NIrIni4qDopqZQV5y3vZvlg DK3e1L1k3QTemqHuC5k6UQKW/2Xzrin4+XAupuQwhcbY2Au+K/xhRLHPQbizdNm1 mQCwZoRYM1Rq6+QzoLoDE1aVRHOZ7bOKc1grOjY1GEfXNn8gscqEtolSyKsyGDjm FrvwfVhqWgaheK0FvdQAzNKAbOLmhwnIQrY7sH4xDU/OFBop8vLKCVab26uTXE1P hd2ocWxw1Zwax1nyIC89FvzMoIWmK3hGsVZjAlgaFrjHjMx+c4YR5DlXHERTTa0C SM3pUHZWwTY7KPU/nZN8HGUUhH8TmyPKWzje/9+nY72oyscvd/b2M9v/ZHxRvmPN ZKKOOTrCM14XC4sEdHBo1w8+W88RjNVkc2YkchrMyOJI/MjxL0qQyHZgcrRcWteg OB+7pRTSrLgb1zr9ESyg/k7q5VUSiTfndGmXoE9dI5TApBlpxTznB1m9nWHBqehA dvnTuEZbnh6MHZMlxgFZCqKj+lt5QFASPF74a9pBYW7z81LZWa0NzqPDlZ30H6CN JGBLmyGWpa6xOoTBpPD7WnEAqS8HouJ3AzvQXSLww24Oe9lFw+KLYz9KfqwhqXQu kR/H2ti3HmQIYynHUvkuTpA= =e2un -----END PGP SIGNATURE-----