Skip to content

Commit

Permalink
creating alpine.profile (#4350)
Browse files Browse the repository at this point in the history
* firecfg.config alpine

* Create alpinef.profile

* Create alpine.profile

* disable-programs.inc alpine

* workaround in comment

* Update etc/profile-a-l/alpine.profile

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>

* deactivating whitelists in ${HOME}

* comment

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
  • Loading branch information
pirate486743186 and rusty-snake authored Jun 21, 2021
1 parent 1a66c8b commit 1ca9046
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
10 changes: 10 additions & 0 deletions etc/inc/disable-programs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ blacklist ${HOME}/.WebStorm*
blacklist ${HOME}/.Wolfram Research
blacklist ${HOME}/.ZAP
blacklist ${HOME}/.abook
blacklist ${HOME}/.addressbook
blacklist ${HOME}/.alpine-smime
blacklist ${HOME}/.aMule
blacklist ${HOME}/.android
blacklist ${HOME}/.anydesk
Expand Down Expand Up @@ -831,6 +833,14 @@ blacklist ${HOME}/.paradoxinteractive
blacklist ${HOME}/.parallelrealities/blobwars
blacklist ${HOME}/.pcsxr
blacklist ${HOME}/.penguin-command
blacklist ${HOME}/.pine-crash
blacklist ${HOME}/.pine-debug1
blacklist ${HOME}/.pine-debug2
blacklist ${HOME}/.pine-debug3
blacklist ${HOME}/.pine-debug4
blacklist ${HOME}/.pine-interrupted-mail
blacklist ${HOME}/.pinerc
blacklist ${HOME}/.pinercex
blacklist ${HOME}/.pingus
blacklist ${HOME}/.pioneer
blacklist ${HOME}/.purple
Expand Down
104 changes: 104 additions & 0 deletions etc/profile-a-l/alpine.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Firejail profile for alpine
# Description: Text-based email and newsgroups reader
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include alpine.local
# Persistent global definitions
include globals.local

# Workaround for bug https://github.com/netblue30/firejail/issues/2747
# firejail --private-bin=sh --include='${CFG}/allow-bin-sh.inc' --profile=alpine sh -c '(alpine)'

noblacklist /var/mail
noblacklist /var/spool/mail
noblacklist ${DOCUMENTS}
noblacklist ${HOME}/.addressbook
noblacklist ${HOME}/.alpine-smime
noblacklist ${HOME}/.mailcap
noblacklist ${HOME}/.mh_profile
noblacklist ${HOME}/.mime.types
noblacklist ${HOME}/.newsrc
noblacklist ${HOME}/.pine-crash
noblacklist ${HOME}/.pine-debug1
noblacklist ${HOME}/.pine-debug2
noblacklist ${HOME}/.pine-debug3
noblacklist ${HOME}/.pine-debug4
noblacklist ${HOME}/.pine-interrupted-mail
noblacklist ${HOME}/.pinerc
noblacklist ${HOME}/.pinercex
noblacklist ${HOME}/.signature
noblacklist ${HOME}/mail

blacklist /tmp/.X11-unix
blacklist ${RUNUSER}/wayland-*

include disable-common.inc
include disable-devel.inc
include disable-exec.inc
include disable-interpreters.inc
include disable-passwdmgr.inc
include disable-programs.inc
include disable-shell.inc
include disable-xdg.inc

#whitelist ${DOCUMENTS}
#whitelist ${DOWNLOADS}
#whitelist ${HOME}/.addressbook
#whitelist ${HOME}/.alpine-smime
#whitelist ${HOME}/.mailcap
#whitelist ${HOME}/.mh_profile
#whitelist ${HOME}/.mime.types
#whitelist ${HOME}/.newsrc
#whitelist ${HOME}/.pine-crash
#whitelist ${HOME}/.pine-interrupted-mail
#whitelist ${HOME}/.pinerc
#whitelist ${HOME}/.pinercex
#whitelist ${HOME}/.pine-debug1
#whitelist ${HOME}/.pine-debug2
#whitelist ${HOME}/.pine-debug3
#whitelist ${HOME}/.pine-debug4
#whitelist ${HOME}/.signature
#whitelist ${HOME}/mail
whitelist /var/mail
whitelist /var/spool/mail
#include whitelist-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
noroot
nosound
notv
nou2f
novideo
protocol unix,inet,inet6
seccomp
seccomp.block-secondary
shell none
tracelog

disable-mnt
private-bin alpine
private-cache
private-dev
private-etc alternatives,c-client.cf,ca-certificates,crypto-policies,host.conf,hostname,hosts,krb5.keytab,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,mailcap,mime.types,nsswitch.conf,passwd,pine.conf,pinerc.fixed,pki,protocols,resolv.conf,rpc,services,ssl,terminfo,xdg
private-tmp
writable-run-user
writable-var

dbus-user none
dbus-system none

memory-deny-write-execute
read-only ${HOME}/.signature
14 changes: 14 additions & 0 deletions etc/profile-a-l/alpinef.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Firejail profile for alpinef
# Description: Text-based email and newsgroups reader using function keys
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include alpinef.local
# Persistent global definitions
# added by included profile
#include globals.local

private-bin alpinef

# Redirect
include alpine.profile
2 changes: 2 additions & 0 deletions src/firecfg/firecfg.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ abrowser
akonadi_control
akregator
alacarte
alpine
alpinef
amarok
amule
amuled
Expand Down

0 comments on commit 1ca9046

Please sign in to comment.