Merge pull request #111635 from xaverdh/hide-pid-broken
nixos/hidepid: remove module, it's broken
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.joachifm ];
|
||||
doc = ./hidepid.xml;
|
||||
};
|
||||
|
||||
options = {
|
||||
security.hideProcessInformation = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Restrict process information to the owning user.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.security.hideProcessInformation {
|
||||
users.groups.proc.gid = config.ids.gids.proc;
|
||||
users.groups.proc.members = [ "polkituser" ];
|
||||
|
||||
boot.specialFileSystems."/proc".options = [ "hidepid=2" "gid=${toString config.ids.gids.proc}" ];
|
||||
systemd.services.systemd-logind.serviceConfig.SupplementaryGroups = [ "proc" ];
|
||||
|
||||
# Disable cgroupsv2, which doesn't work with hidepid.
|
||||
# https://github.com/NixOS/nixpkgs/pull/104094#issuecomment-729996203
|
||||
systemd.enableUnifiedCgroupHierarchy = false;
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="sec-hidepid">
|
||||
<title>Hiding process information</title>
|
||||
<para>
|
||||
Setting
|
||||
<programlisting>
|
||||
<xref linkend="opt-security.hideProcessInformation"/> = true;
|
||||
</programlisting>
|
||||
ensures that access to process information is restricted to the owning user.
|
||||
This implies, among other things, that command-line arguments remain private.
|
||||
Unless your deployment relies on unprivileged users being able to inspect the
|
||||
process information of other users, this option should be safe to enable.
|
||||
</para>
|
||||
<para>
|
||||
Members of the <literal>proc</literal> group are exempt from process
|
||||
information hiding.
|
||||
</para>
|
||||
<para>
|
||||
To allow a service <replaceable>foo</replaceable> to run without process
|
||||
information hiding, set
|
||||
<programlisting>
|
||||
<link linkend="opt-systemd.services._name_.serviceConfig">systemd.services.<replaceable>foo</replaceable>.serviceConfig</link>.SupplementaryGroups = [ "proc" ];
|
||||
</programlisting>
|
||||
</para>
|
||||
</chapter>
|
||||
Reference in New Issue
Block a user