Skip to content

Commit 6710d0d

Browse files
authored
nixos/logrotate: relax hardening (#345275)
2 parents 27e93e3 + d3e0a89 commit 6710d0d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nixos/modules/services/logging/logrotate.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ in
260260
# hardening
261261
CapabilityBoundingSet = [
262262
"CAP_CHOWN"
263+
"CAP_DAC_OVERRIDE"
264+
"CAP_SETUID"
263265
"CAP_SETGID"
264266
];
265267
DevicePolicy = "closed";
@@ -280,16 +282,16 @@ in
280282
ProtectSystem = "full";
281283
RestrictNamespaces = true;
282284
RestrictRealtime = true;
283-
RestrictSUIDSGID = true;
285+
RestrictSUIDSGID = false; # can create sgid directories
284286
SystemCallArchitectures = "native";
285287
SystemCallFilter = [
286-
"@system-service"
288+
"@system-service @setuid"
287289
"~@privileged @resources"
288290
"@chown"
289291
];
290292
UMask = "0027";
291293
} // lib.optionalAttrs (!cfg.allowNetworking) {
292-
PrivateNetwork = true;
294+
PrivateNetwork = true; # e.g. mail delivery
293295
RestrictAddressFamilies = "none";
294296
};
295297
};

0 commit comments

Comments
 (0)