summary refs log tree commit diff
path: root/nixos/tests/proxy.nix
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-04-09 20:22:16 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-04-10 12:27:06 +0200
commitcef2814a4f0530f6e020badc56dd808a96422a66 (patch)
tree6455422d43255cb6ac78ca343940516277425828 /nixos/tests/proxy.nix
parent496a36980540390ac47e59310b3d73d516a531a2 (diff)
downloadnixlib-cef2814a4f0530f6e020badc56dd808a96422a66.tar
nixlib-cef2814a4f0530f6e020badc56dd808a96422a66.tar.gz
nixlib-cef2814a4f0530f6e020badc56dd808a96422a66.tar.bz2
nixlib-cef2814a4f0530f6e020badc56dd808a96422a66.tar.lz
nixlib-cef2814a4f0530f6e020badc56dd808a96422a66.tar.xz
nixlib-cef2814a4f0530f6e020badc56dd808a96422a66.tar.zst
nixlib-cef2814a4f0530f6e020badc56dd808a96422a66.zip
nixos: add optional process information hiding
This module adds an option `security.hideProcessInformation` that, when
enabled, restricts access to process information such as command-line
arguments to the process owner.  The module adds a static group "proc"
whose members are exempt from process information hiding.

Ideally, this feature would be implemented by simply adding the
appropriate mount options to `fileSystems."/proc".fsOptions`, but this
was found to not work in vmtests. To ensure that process information
hiding is enforced, we use a systemd service unit that remounts `/proc`
after `systemd-remount-fs.service` has completed.

To verify the correctness of the feature, simple tests were added to
nixos/tests/misc: the test ensures that unprivileged users cannot see
process information owned by another user, while members of "proc" CAN.

Thanks to @abbradar for feedback and suggestions.
Diffstat (limited to 'nixos/tests/proxy.nix')
0 files changed, 0 insertions, 0 deletions