git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/geoipupdate: Add stricter service security
commit7cc39b13b00dd8ce5eebc5a1cb53e3de22dc9b99 authortalyz <kim.lindberger@gmail.com> dateMon 7 Jun 2021, 13:14 (5 years ago) parent41c82cd
1 file changed+20
nixos/modules/services/misc/geoipupdate.nix+20
nixos/modules/services/misc/geoipupdate.nix+20
@@ -150,6 +150,26 @@ in
150150 ReadWritePaths = cfg.settings.DatabaseDirectory;
151151 RuntimeDirectory = "geoipupdate";
152152 RuntimeDirectoryMode = 0700;
153+ CapabilityBoundingSet = "";
154+ PrivateDevices = true;
155+ PrivateMounts = true;
156+ PrivateUsers = true;
157+ ProtectClock = true;
158+ ProtectControlGroups = true;
159+ ProtectHome = true;
160+ ProtectHostname = true;
161+ ProtectKernelLogs = true;
162+ ProtectKernelModules = true;
163+ ProtectKernelTunables = true;
164+ ProtectProc = "invisible";
165+ ProcSubset = "pid";
166+ SystemCallFilter = [ "@system-service" "~@privileged" "~@resources" ];
167+ RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
168+ RestrictRealtime = true;
169+ RestrictNamespaces = true;
170+ MemoryDenyWriteExecute = true;
171+ LockPersonality = true;
172+ SystemCallArchitectures = "native";
153173 };
154174 };
155175