Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SELinux error #460

Merged
merged 3 commits into from
Sep 11, 2023
Merged

Fix SELinux error #460

merged 3 commits into from
Sep 11, 2023

Conversation

DavidePrincipi
Copy link
Member

@DavidePrincipi DavidePrincipi commented Sep 11, 2023

The wireguard_t context has no permissions to write the wg0.conf file.

This commit avoid to write the file from the wg-quick service unit, by removing our custom WireGuard configuration, as it should be useless ATM.

AVC Report
===============================================================
# date time comm subj syscall class permission obj result event
===============================================================
1. 09/08/2023 12:25:06 wg-quick system_u:system_r:wireguard_t:s0 257 dir write system_u:object_r:etc_t:s0 denied 330036

@DavidePrincipi DavidePrincipi self-assigned this Sep 11, 2023
The wireguard_t context has no permissions to write the wg0.conf file.

This commit avoid to write the file from the wg-quick service unit, by removing
our custom WireGuard configuration, as it should be useless ATM.
@DavidePrincipi DavidePrincipi marked this pull request as ready for review September 11, 2023 14:52
@DavidePrincipi DavidePrincipi added the bug Something isn't working label Sep 11, 2023
docs/core/vpn.md Outdated Show resolved Hide resolved
rm -vf /etc/systemd/system/redis.service.d/wireguard.conf \
'/etc/systemd/system/wg-quick@wg0.service.d/persist-wg0-config.conf' \
/etc/wireguard/wg0.conf
rm -vf /etc/wireguard/wg0.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think change will leave the file '/etc/systemd/system/wg-quick@wg0.service.d/persist-wg0-config.conf' on a ns8 updated from beta1 to beta2.
If so, we should add a new entry to the upgrade notes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, it's a bug. The install-coreimage command should remove it at the right time.

Co-authored-by: Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
@DavidePrincipi DavidePrincipi merged commit 56404b7 into main Sep 11, 2023
@DavidePrincipi DavidePrincipi deleted the fix-wireguard-stop branch September 11, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants