Skip to content

Commit

Permalink
New profile: qemu-common.profile
Browse files Browse the repository at this point in the history
Add a common profile to deduplicate entries and make qemu-related
profiles redirect to it.

Relates to netblue30#6255.
  • Loading branch information
kmk3 committed Mar 23, 2024
1 parent 96d66fa commit 49f4b7e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 50 deletions.
28 changes: 28 additions & 0 deletions etc/profile-m-z/qemu-common.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Firejail profile for QEMU
# Description: Machine & userspace emulator and virtualizer
# This file is overwritten after every install/update
# Persistent local customizations
include qemu-common.local
# Persistent global definitions
# added by caller profile
#include globals.local

include disable-common.inc
include disable-programs.inc

caps.drop all
netfilter
nodvd
nogroups
nonewprivs
noroot
notv
protocol unix,inet,inet6
seccomp
tracelog

private-cache
private-tmp

noexec /tmp
restrict-namespaces
21 changes: 2 additions & 19 deletions etc/profile-m-z/qemu-launcher.profile
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,5 @@ include globals.local

noblacklist ${HOME}/.qemu-launcher

include disable-common.inc
include disable-programs.inc

caps.drop all
netfilter
nodvd
nogroups
nonewprivs
noroot
notv
protocol unix,inet,inet6
seccomp
tracelog

private-cache
private-tmp

noexec /tmp
restrict-namespaces
# Redirect
include qemu-common.profile
21 changes: 2 additions & 19 deletions etc/profile-m-z/qemu-system-x86_64.profile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,5 @@ include qemu-system-x86_64.local
# Persistent global definitions
include globals.local

include disable-common.inc
include disable-programs.inc

caps.drop all
netfilter
nodvd
nogroups
nonewprivs
noroot
notv
protocol unix,inet,inet6
seccomp
tracelog

private-cache
private-tmp

noexec /tmp
restrict-namespaces
# Redirect
include qemu-common.profile
16 changes: 4 additions & 12 deletions etc/profile-m-z/tqemu.profile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,13 @@ include tqemu.local
# Persistent global definitions
include globals.local

include disable-common.inc
include disable-programs.inc
# breaks app
ignore restrict-namespaces

# For host-only network sys_admin is needed.
# See https://github.com/netblue30/firejail/issues/2868#issuecomment-518647630
caps.keep net_raw,sys_nice
#caps.keep net_raw,sys_admin
netfilter
nodvd
notv
tracelog

private-cache
private-tmp

noexec /tmp
# breaks app
#restrict-namespaces
# Redirect
include qemu-common.profile

0 comments on commit 49f4b7e

Please sign in to comment.