nixpkgs/nixos/modules
Robert Obryk c64bbd4466 nixos/security/wrappers: remove all the assertions about readlink(/proc/self/exe)
Given that we are no longer inspecting the target of the /proc/self/exe
symlink, stop asserting that it has any properties. Remove the plumbing
for wrappersDir, which is no longer used.

Asserting that the binary is located in the specific place is no longer
necessary, because we don't rely on that location being writable only by
privileged entities (we used to rely on that when assuming that
readlink(/proc/self/exe) will continue to point at us and when assuming
that the `.real` file can be trusted).

Assertions about lack of write bits on the file were
IMO meaningless since inception: ignoring the Linux's refusal to honor
S[UG]ID bits on files-writeable-by-others, if someone could have
modified the wrapper in a way that preserved the capability or S?ID
bits, they could just remove this check.

Assertions about effective UID were IMO just harmful: if we were
executed without elevation, the caller would expect the result that
would cause in a wrapperless distro: the targets gets executed without
elevation. Due to lack of elevation, that cannot be used to abuse
privileges that the elevation would give.

This change partially fixes #98863 for S[UG]ID wrappers. The issue for
capability wrappers remains.
2023-08-27 14:10:38 +02:00
..
config nixos/zram: use nixos/zram-generator as backing implementation 2023-08-13 15:38:40 +08:00
hardware Merge pull request #244060 from Gerg-L/nvidiaDynamicBoost 2023-08-10 17:02:26 +02:00
i18n/input-method nixos/fcitx5: fix evaluation 2023-08-15 08:15:41 +08:00
image modules/image/repart: Fix stripNixStorePrefix 2023-08-22 13:09:03 +02:00
installer Merge pull request #248701 from doronbehar/nixos/manpages 2023-08-16 15:49:49 +00:00
misc nixos/doc: Improve documentation of documentation 2023-08-12 22:28:04 +03:00
profiles nixos/installation-device: allow nix-copy for root/nixos user 2023-08-07 16:48:49 +02:00
programs Merge pull request #248748 from acid-bong/zshLsColors 2023-08-24 22:04:43 +03:00
security nixos/security/wrappers: remove all the assertions about readlink(/proc/self/exe) 2023-08-27 14:10:38 +02:00
services nixos/netbox: add keycloakClientSecret option 2023-08-25 15:42:44 +01:00
system nixos/binfmt: use PE magic to detect Wine executables 2023-08-23 16:20:57 +03:00
tasks nixos/security/wrappers: generate a separate and more complete apparmor policy fragment for each wrapper 2023-08-27 14:10:07 +02:00
testing Merge pull request #219106 from m-bdf/nixos-testing-increase-device-timeout 2023-06-20 11:48:45 +02:00
virtualisation Merge master into staging-next 2023-08-19 00:01:42 +00:00
module-list.nix Merge pull request #248855 from NickCao/zram-generator 2023-08-24 08:57:22 +08:00
rename.nix nixos/dhcp(46): remove 2023-07-28 16:35:40 +02:00