nixpkgs/nixos/modules/security
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
..
acme security/acme: Fix listenHTTP bug with IPv6 addresses 2023-05-14 20:27:52 -04:00
apparmor nixos/apparmor: support custom i18n glibc locales 2023-07-12 21:38:31 +02:00
wrappers nixos/security/wrappers: remove all the assertions about readlink(/proc/self/exe) 2023-08-27 14:10:38 +02:00
apparmor.nix nixos: fix typos 2022-12-17 19:31:14 -05:00
audit.nix nixos: fix backticks in Markdown descriptions 2023-01-21 18:08:38 +01:00
auditd.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
ca.nix nixos/qemu-vm: use CA certificates from host 2023-07-06 21:32:08 +10:00
chromium-suid-sandbox.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
dhparams.nix nixos/*: convert options with admonitions to MD 2022-08-31 16:36:16 +02:00
doas.nix doas: refactor config generation 2023-03-17 09:05:08 -07:00
duosec.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
google_oslogin.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
ipa.nix treewide: stop using types.string 2023-08-08 21:31:21 +08:00
lock-kernel-modules.nix treewide: use optional instead of 'then []' 2023-06-25 09:11:40 -03:00
misc.nix nixos/*: convert varlist-using options to MD 2022-08-31 16:32:53 +02:00
oath.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
pam.nix security/pam: add umask option to configure pam_mkhomedir 2023-08-10 20:35:08 -04:00
pam_mount.nix nixos/pam_mount: fix mounts without options (#234026) 2023-05-25 22:45:59 +02:00
pam_usb.nix nixos/*: automatically convert option docs to MD 2022-08-03 22:46:41 +02:00
please.nix nixos/please: init module 2022-10-15 07:05:10 -07:00
polkit.nix Revert "nixos/polkit: guard static gid for polkituser behind state version" 2023-02-25 22:32:16 -05:00
rngd.nix
rtkit.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
sudo.nix treewide: use optional instead of 'then []' 2023-06-25 09:11:40 -03:00
systemd-confinement.nix nixos/systemd-confinement: remove unused rootName 2023-01-20 22:39:16 +01:00
tpm2.nix nixos/tpm2: fix typo 2023-05-09 18:02:17 +04:00