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

New profile: ncmpcpp #6587

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
69 changes: 69 additions & 0 deletions etc/profile-m-z/ncmpcpp.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Firejail profile for ncmpcpp
# Description: Featureful ncurses based MPD client inspired by ncmpc
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include ncmpcpp.local
# Persistent global definitions
include globals.local

# Allow /bin/sh (blacklisted by disable-shell.inc)
include allow-bin-sh.inc

blacklist ${RUNUSER}
blacklist /usr/libexec

include disable-common.inc
include disable-devel.inc
include disable-exec.inc
include disable-interpreters.inc
include disable-proc.inc
include disable-programs.inc
include disable-shell.inc
#include disable-write-mnt.inc
include disable-X11.inc
include disable-xdg.inc

mkdir ${HOME}/.config/ncmpcpp
mkdir ${HOME}/.lyrics
whitelist ${HOME}/.config/ncmpcpp
whitelist ${HOME}/.lyrics
Comment on lines +27 to +30
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add these paths to disable-programs.inc and add corresponding noblacklist
entries in this profile.

This should be done whenever adding program-specific paths.

Also, if any of the configuration files allow arbitrary code execution, add
read-only $path to disable-common.inc (and read-write $path to this profile
if the configuration file can be edited by the program itself).

This also applies to the other PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of suggested changes. I will try to apply all changes at once tomorrow.

whitelist /var/lib/mpd
include whitelist-common.inc
include whitelist-run-common.inc
include whitelist-runuser-common.inc
include whitelist-usr-share-common.inc
include whitelist-var-common.inc

apparmor
caps.drop all
ipc-namespace
machine-id
netfilter
no3d
nodvd
nogroups
noinput
nonewprivs
noprinters
noroot
nosound
notpm
notv
nou2f
novideo
protocol unix,inet,inet6
seccomp
seccomp.block-secondary

disable-mnt
private-bin ncmpcpp,sh
private-cache
private-dev
private-tmp

dbus-user none
dbus-system none

deterministic-shutdown
memory-deny-write-execute
Loading