mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
feat(profiles): add initial userns rule.
Require apparmor 4 to be enabled.
This commit is contained in:
parent
6dc990ac02
commit
88555a12d0
5 changed files with 11 additions and 5 deletions
|
@ -31,6 +31,8 @@
|
||||||
include <abstractions/vulkan>
|
include <abstractions/vulkan>
|
||||||
include <abstractions/wayland>
|
include <abstractions/wayland>
|
||||||
|
|
||||||
|
# userns,
|
||||||
|
|
||||||
capability setgid,
|
capability setgid,
|
||||||
capability setuid,
|
capability setuid,
|
||||||
capability sys_admin,
|
capability sys_admin,
|
||||||
|
|
|
@ -10,6 +10,8 @@ include <tunables/global>
|
||||||
profile virtiofsd @{exec_path} {
|
profile virtiofsd @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
|
# userns,
|
||||||
|
|
||||||
capability chown,
|
capability chown,
|
||||||
capability dac_override,
|
capability dac_override,
|
||||||
capability dac_read_search,
|
capability dac_read_search,
|
||||||
|
|
|
@ -10,6 +10,8 @@ include <tunables/global>
|
||||||
profile slirp4netns @{exec_path} flags=(attach_disconnected) {
|
profile slirp4netns @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
|
# userns,
|
||||||
|
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
capability setpcap,
|
capability setpcap,
|
||||||
capability sys_admin,
|
capability sys_admin,
|
||||||
|
|
|
@ -35,6 +35,8 @@ profile thunderbird @{exec_path} {
|
||||||
include <abstractions/vulkan>
|
include <abstractions/vulkan>
|
||||||
include <abstractions/wayland>
|
include <abstractions/wayland>
|
||||||
|
|
||||||
|
# userns,
|
||||||
|
|
||||||
capability sys_admin, # If kernel.unprivileged_userns_clone = 1
|
capability sys_admin, # If kernel.unprivileged_userns_clone = 1
|
||||||
capability sys_chroot, # If kernel.unprivileged_userns_clone = 1
|
capability sys_chroot, # If kernel.unprivileged_userns_clone = 1
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,9 @@ var (
|
||||||
regAttachments = regexp.MustCompile(`(profile .* @{exec_path})`)
|
regAttachments = regexp.MustCompile(`(profile .* @{exec_path})`)
|
||||||
regFlags = regexp.MustCompile(`flags=\(([^)]+)\)`)
|
regFlags = regexp.MustCompile(`flags=\(([^)]+)\)`)
|
||||||
regProfileHeader = regexp.MustCompile(` {`)
|
regProfileHeader = regexp.MustCompile(` {`)
|
||||||
regAbi4To3 = util.ToRegexRepl([]string{
|
regAbi4To3 = util.ToRegexRepl([]string{ // Currently Abi3 -> Abi4
|
||||||
`abi/4.0`, `abi/3.0`,
|
`abi/3.0`, `abi/4.0`,
|
||||||
`(?m)^.*mqueue.*$`, ``,
|
`# userns,`, `userns,`,
|
||||||
`(?m)^.*userns.*$`, ``,
|
|
||||||
`(?m)^.*io_uring.*$`, ``,
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue