Add slirp4netns

This commit is contained in:
Alexandre Pujol 2021-09-26 17:30:06 +01:00
parent a6f1a58743
commit f4d8830963
Failed to generate hash of commit

View file

@ -0,0 +1,41 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/slirp4netns
profile slirp4netns @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
capability net_admin,
capability setpcap,
capability sys_admin,
network inet stream,
network inet6 stream,
network inet dgram,
network inet6 dgram,
mount options=(rw, make-slave) -> **,
mount options=(rw, make-rslave) -> **,
mount options=(ro, nosuid, nodev, noexec, remount, bind) -> **,
umount,
@{exec_path} mr,
/tmp/{,**} rw,
/old/ rw,
owner @{run}/user/@{uid}/libpod/tmp/slirp4netns-*.log r,
@{run}/user/@{uid}/netns/cni-* r,
pivot_root /tmp/**,
pivot_root /tmp/old/,
/dev/net/tun rw,
include if exists <local/slirp4netns>
}