Skip to content

Commit

Permalink
Merge pull request #4069 from rusty-snake/hasher-profiles
Browse files Browse the repository at this point in the history
Add profile for checksum tools
  • Loading branch information
netblue30 committed Mar 19, 2021
2 parents faf0ae2 + f7e232c commit 63fc5d9
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 0 deletions.
13 changes: 13 additions & 0 deletions etc/profile-a-l/b2sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for b2sum
# Description: compute and check BLAKE2 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include b2sum.local
# Persistent global definitions
include globals.local

private-bin b2sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-a-l/cksum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for cksum
# Description: checksum and count the bytes in a file
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include cksum.local
# Persistent global definitions
include globals.local

private-bin cksum

# Redirect
include hasher-common.profile
60 changes: 60 additions & 0 deletions etc/profile-a-l/hasher-common.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This file is overwritten during software install.
# Persistent customizations should go in a .local file.
include hasher-common.local

# common profile for hasher/checksum tools

blacklist ${RUNUSER}

# WARNING:
# Users can (un)restrict file access for **all** hashers by commenting/uncommenting the needed
# include file(s) here or by putting those into hasher-common.local.
# Another option is to do this **per hasher** in the relevant <hasher>.local.
# Just beware that things tend to break when overtightening profiles. For example, because you only
# need to hash/check files in ${DOWNLOADS}, other applications may need access to ${HOME}/.local/share.

# Uncomment the next line (or put it into your hasher-common.local) if you don't need to hash files in disable-common.inc.
#include disable-common.inc
include disable-devel.inc
include disable-exec.inc
include disable-interpreters.inc
include disable-passwdmgr.inc
# Uncomment the next line (or put it into your hasher-common.local) if you don't need to hash files in disable-programs.inc.
#include disable-programs.inc
include disable-shell.inc
include disable-write-mnt.inc
# Uncomment the next line (or put it into your hasher-common.local) if you don't need to hash files in disable-xdg.inc.
#include disable-xdg.inc

apparmor
caps.drop all
ipc-namespace
machine-id
net none
no3d
nodvd
nogroups
nonewprivs
noroot
nosound
notv
nou2f
novideo
protocol unix
seccomp
seccomp.block-secondary
shell none
tracelog
x11 none

# Uncomment the next line (or put it into your hasher-common.local) if you don't need to hash files in /tmp.
#private-cache
private-dev
# Uncomment the next line (or put it into your hasher-common.local) if you don't need to hash files in /tmp.
#private-tmp

dbus-user none
dbus-system none

memory-deny-write-execute
read-only ${HOME}
13 changes: 13 additions & 0 deletions etc/profile-m-z/md5sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for md5sum
# Description: compute and check MD5 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include md5sum.local
# Persistent global definitions
include globals.local

private-bin md5sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-m-z/sha1sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for sha1sum
# Description: compute and check SHA1 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include sha1sum.local
# Persistent global definitions
include globals.local

private-bin sha1sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-m-z/sha224sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for sha224sum
# Description: compute and check SHA224 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include sha224sum.local
# Persistent global definitions
include globals.local

private-bin sha224sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-m-z/sha256sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for sha256sum
# Description: compute and check SHA256 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include sha256sum.local
# Persistent global definitions
include globals.local

private-bin sha256sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-m-z/sha384sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for sha384sum
# Description: compute and check SHA384 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include sha384sum.local
# Persistent global definitions
include globals.local

private-bin sha384sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-m-z/sha512sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for sha512sum
# Description: compute and check SHA512 message digest
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include sha512sum.local
# Persistent global definitions
include globals.local

private-bin sha512sum

# Redirect
include hasher-common.profile
13 changes: 13 additions & 0 deletions etc/profile-m-z/sum.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for sum
# Description: checksum and count the blocks in a file
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include sum.local
# Persistent global definitions
include globals.local

private-bin sum

# Redirect
include hasher-common.profile

0 comments on commit 63fc5d9

Please sign in to comment.