mirror of
https://codeberg.org/demostf/sync.git
synced 2026-06-03 16:44:07 +02:00
socket permissions
This commit is contained in:
parent
c11281384a
commit
74df62fe9c
2 changed files with 13 additions and 3 deletions
|
|
@ -21,6 +21,12 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.demostf-sync = {
|
||||
group = "demostf-sync";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.demostf-sync = {};
|
||||
|
||||
systemd.services.demostf-sync = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
environment = {
|
||||
|
|
@ -28,7 +34,7 @@ in {
|
|||
};
|
||||
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
User = "demostf-sync";
|
||||
ExecStart = "${cfg.package}/bin/sync";
|
||||
Restart = "on-failure";
|
||||
|
||||
|
|
@ -55,9 +61,11 @@ in {
|
|||
ProcSubset = "pid";
|
||||
ProtectProc = "invisible";
|
||||
SystemCallFilter = ["@system-service" "~@resources" "~@privileged"];
|
||||
UMask = "0007";
|
||||
UMask = "0077";
|
||||
IPAddressDeny = "any";
|
||||
RuntimeDirectory = "demostf-sync";
|
||||
RestrictSUIDSGID = true;
|
||||
RemoveIPC = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue