mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
More derp? It's 5am...
This commit is contained in:
parent
1cc500ea8e
commit
a3e9d77640
1 changed files with 15 additions and 11 deletions
|
@ -898,23 +898,27 @@ in
|
|||
|
||||
# Capabilities won't work unless we have at-least a 4.3 Linux
|
||||
# kernel because we need the ambient capability
|
||||
security.wrappers = mkIf (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") {
|
||||
ping = {
|
||||
source = "${pkgs.iputils.out}/bin/ping";
|
||||
capabilities = "cap_net_raw+p";
|
||||
};
|
||||
security = mkIf (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") {
|
||||
wrappers = {
|
||||
ping = {
|
||||
source = "${pkgs.iputils.out}/bin/ping";
|
||||
capabilities = "cap_net_raw+p";
|
||||
};
|
||||
|
||||
ping6 = {
|
||||
source = "${pkgs.iputils.out}/bin/ping6";
|
||||
capabilities = "cap_net_raw+p";
|
||||
ping6 = {
|
||||
source = "${pkgs.iputils.out}/bin/ping6";
|
||||
capabilities = "cap_net_raw+p";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# If the linux kernel IS older than 4.3, create setuid wrappers
|
||||
# for ping and ping6
|
||||
security.wrappers = mkIf (versionOlder (getVersion config.boot.kernelPackages.kernel) "4.3") {
|
||||
ping.source = "${pkgs.iputils.out}/bin/ping";
|
||||
"ping6".source = "${pkgs.iputils.out}/bin/ping6";
|
||||
security = mkIf (versionOlder (getVersion config.boot.kernelPackages.kernel) "4.3") {
|
||||
wrappers = {
|
||||
ping.source = "${pkgs.iputils.out}/bin/ping";
|
||||
"ping6".source = "${pkgs.iputils.out}/bin/ping6";
|
||||
};
|
||||
};
|
||||
|
||||
# Set the host and domain names in the activation script. Don't
|
||||
|
|
Loading…
Reference in a new issue