Beebooboop
This commit is contained in:
parent
a3e9d77640
commit
3215bcf445
|
@ -898,27 +898,19 @@ in
|
||||||
|
|
||||||
# Capabilities won't work unless we have at-least a 4.3 Linux
|
# Capabilities won't work unless we have at-least a 4.3 Linux
|
||||||
# kernel because we need the ambient capability
|
# kernel because we need the ambient capability
|
||||||
security = mkIf (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") {
|
security.wrappers = if (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") then {
|
||||||
wrappers = {
|
ping = {
|
||||||
ping = {
|
source = "${pkgs.iputils.out}/bin/ping";
|
||||||
source = "${pkgs.iputils.out}/bin/ping";
|
capabilities = "cap_net_raw+p";
|
||||||
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
|
ping6 = {
|
||||||
# for ping and ping6
|
source = "${pkgs.iputils.out}/bin/ping6";
|
||||||
security = mkIf (versionOlder (getVersion config.boot.kernelPackages.kernel) "4.3") {
|
capabilities = "cap_net_raw+p";
|
||||||
wrappers = {
|
|
||||||
ping.source = "${pkgs.iputils.out}/bin/ping";
|
|
||||||
"ping6".source = "${pkgs.iputils.out}/bin/ping6";
|
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
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
|
# Set the host and domain names in the activation script. Don't
|
||||||
|
|
Loading…
Reference in New Issue