···6969 `/etc/group` and `/etc/shadow`. This also creates home directories
7070- `usrbinenv` creates `/usr/bin/env`
7171- `var` creates some directories in `/var` that are not service-specific
7272-- `wrappers` creates setuid wrappers like `ping` and `sudo`
7272+- `wrappers` creates setuid wrappers like `sudo`
-6
nixos/modules/security/apparmor/profiles.nix
···22let apparmor = config.security.apparmor; in
33{
44config.security.apparmor.packages = [ pkgs.apparmor-profiles ];
55-config.security.apparmor.policies."bin.ping".profile = lib.mkIf apparmor.policies."bin.ping".enable ''
66- include "${pkgs.iputils.apparmor}/bin.ping"
77- include "${pkgs.inetutils.apparmor}/bin.ping"
88- # Note that including those two profiles in the same profile
99- # would not work if the second one were to re-include <tunables/global>.
1010-'';
115}
···14061406 val = tempaddrValues.${opt}.sysctl;
14071407 in nameValuePair "net.ipv6.conf.${replaceStrings ["."] ["/"] i.name}.use_tempaddr" val));
1408140814091409- security.wrappers = {
14101410- ping = {
14111411- owner = "root";
14121412- group = "root";
14131413- capabilities = "cap_net_raw+p";
14141414- source = "${pkgs.iputils.out}/bin/ping";
14151415- };
14161416- };
14171417- security.apparmor.policies."bin.ping".profile = lib.mkIf config.security.apparmor.policies."bin.ping".enable (lib.mkAfter ''
14181418- /run/wrappers/bin/ping {
14191419- include <abstractions/base>
14201420- include <nixos/security.wrappers/ping>
14211421- rpx /run/wrappers/wrappers.*/ping,
14221422- }
14231423- /run/wrappers/wrappers.*/ping {
14241424- include <abstractions/base>
14251425- include <nixos/security.wrappers/ping>
14261426- capability net_raw,
14271427- capability setpcap,
14281428- }
14291429- '');
14301430-14311409 # Set the host and domain names in the activation script. Don't
14321410 # clear it if it's not configured in the NixOS configuration,
14331411 # since it may have been set by dhcpcd in the meantime.
+1-1
nixos/tests/systemd.nix
···169169170170 # Do some IP traffic
171171 output_ping = machine.succeed(
172172- "systemd-run --wait -- /run/wrappers/bin/ping -c 1 127.0.0.1 2>&1"
172172+ "systemd-run --wait -- ping -c 1 127.0.0.1 2>&1"
173173 )
174174175175 with subtest("systemd reports accounting data on system.slice"):
+5-3
pkgs/servers/monitoring/plugins/default.nix
···2121, openldap
2222, procps
2323, runtimeShell
2424+, unixtools
2425}:
25262627let
···3334 lm_sensors
3435 net-snmp
3536 procps
3737+ unixtools.ping
3638 ];
37393840 mailq = runCommand "mailq-wrapper" { preferLocalBuild = true; } ''
···5860 sha256 = "sha256-yLhHOSrPFRjW701aOL8LPe4OnuJxL6f+dTxNqm0evIg=";
5961 };
60626161- # TODO: Awful hack. Grrr... this of course only works on NixOS.
6363+ # TODO: Awful hack. Grrr...
6264 # Anyway the check that configure performs to figure out the ping
6365 # syntax is totally impure, because it runs an actual ping to
6466 # localhost (which won't work for ping6 if IPv6 support isn't
···7476 -e 's|^DEFAULT_PATH=.*|DEFAULT_PATH=\"${binPath}\"|'
75777678 configureFlagsArray+=(
7777- --with-ping-command='/run/wrappers/bin/ping -4 -n -U -w %d -c %d %s'
7878- --with-ping6-command='/run/wrappers/bin/ping -6 -n -U -w %d -c %d %s'
7979+ --with-ping-command='ping -4 -n -U -w %d -c %d %s'
8080+ --with-ping6-command='ping -6 -n -U -w %d -c %d %s'
7981 )
80828183 install -Dm555 ${share} $out/share