mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 10:14:09 +00:00
nixos/logrotate: relax hardening
The previous hardening change restricted the unit too much, breaking legitimate functionality of logrotate. Unfortunately this was not covered by our NixOS test.
This commit is contained in:
parent
325a2b4871
commit
d3e0a89ca6
@ -260,6 +260,8 @@ in
|
||||
# hardening
|
||||
CapabilityBoundingSet = [
|
||||
"CAP_CHOWN"
|
||||
"CAP_DAC_OVERRIDE"
|
||||
"CAP_SETUID"
|
||||
"CAP_SETGID"
|
||||
];
|
||||
DevicePolicy = "closed";
|
||||
@ -280,16 +282,16 @@ in
|
||||
ProtectSystem = "full";
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
RestrictSUIDSGID = false; # can create sgid directories
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [
|
||||
"@system-service"
|
||||
"@system-service @setuid"
|
||||
"~@privileged @resources"
|
||||
"@chown"
|
||||
];
|
||||
UMask = "0027";
|
||||
} // lib.optionalAttrs (!cfg.allowNetworking) {
|
||||
PrivateNetwork = true;
|
||||
PrivateNetwork = true; # e.g. mail delivery
|
||||
RestrictAddressFamilies = "none";
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user