1 { config, lib, pkgs, ... }:
3 cfg = config.security.apparmor;
8 (mkRenamedOptionModule [ "security" "virtualization" "flushL1DataCache" ] [ "security" "virtualisation" "flushL1DataCache" ])
11 options.security.apparmor.confineSUIDApplications = mkOption {
15 Install AppArmor profiles for commonly-used SUID application
16 to mitigate potential privilege escalation attacks due to bugs
19 Currently available profiles: ping
23 config = mkIf (cfg.confineSUIDApplications) {
24 security.apparmor.complainProfiles = [ "bin/ping" ];
25 security.apparmor.profiles."bin/ping" = ''
26 #include <tunables/global>
27 /run/wrappers/bin/ping {
28 #include <abstractions/base>
29 #include <abstractions/consoles>
30 #include <abstractions/nameservice>
36 ${pkgs.stdenv.cc.libc.out}/lib/*.so mr,
37 ${pkgs.libcap.lib}/lib/libcap.so* mr,
38 ${pkgs.attr.out}/lib/libattr.so* mr,
40 ${pkgs.iputils}/bin/ping mixr,
44 ## Site-specific additions and overrides. See local/README for details.
45 ##include <local/bin.ping>