Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict users to only see their own processes #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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