fix(systemd): add ReadWritePaths for /etc/hosts

Signed-off-by: Adam Rizkalla <ajarizzo@gmail.com>
This commit is contained in:
Adam Rizkalla
2025-03-01 23:28:09 +00:00
committed by Steffen Vogel
parent e073af34ab
commit b798180358
2 changed files with 5 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ ProtectKernelLogs=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
ReadWritePaths=-/etc/hosts
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
@@ -55,4 +56,4 @@ SystemCallErrorNumber=EPERM
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

View File

@@ -154,6 +154,9 @@ in
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
ReadWritePaths = [
"-/etc/hosts"
];
RestrictAddressFamilies = [
"AF_UNIX"
"AF_INET"