Skip to content

Commit

Permalink
Restrict users to only see their own processes
Browse files Browse the repository at this point in the history
  • Loading branch information
aguslr committed Jul 22, 2023
1 parent ebd80f7 commit 4e01228
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM quay.io/fedora-ostree-desktops/silverblue:${FEDORA_MAJOR_VERSION}
COPY rootfs/ /

RUN systemctl enable rpm-ostree-kargs.service && \
systemctl enable proc-hidepid.service && \
rpm-ostree install chromium haveged && \
rpm-ostree override remove firefox firefox-langpacks && \
rpm-ostree cleanup -m && \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Features
- Set additional kernel runtime parameters.
- Blacklist rarely used kernel modules.
- Replace Firefox with Chromium.
- Restrict users to only see their own processes.

Verification
------------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Service]
SupplementaryGroups=adm
15 changes: 15 additions & 0 deletions rootfs/usr/lib/systemd/system/proc-hidepid.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Restrict users to only see their own processes
Documentation=https://github.com/Whonix/security-misc
DefaultDependencies=no
Before=sysinit.target
Requires=local-fs.target
After=local-fs.target

[Service]
Type=oneshot
ExecStart=/bin/mount -o remount,nosuid,nodev,noexec,hidepid=2,gid=adm /proc
RemainAfterExit=yes

[Install]
WantedBy=sysinit.target

0 comments on commit 4e01228

Please sign in to comment.