From f4d883096301d22eb3f388ae566a8c409b1df96e Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 26 Sep 2021 17:30:06 +0100 Subject: [PATCH] Add slirp4netns --- apparmor.d/profiles-s-z/slirp4netns | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 apparmor.d/profiles-s-z/slirp4netns diff --git a/apparmor.d/profiles-s-z/slirp4netns b/apparmor.d/profiles-s-z/slirp4netns new file mode 100644 index 00000000..d662ee80 --- /dev/null +++ b/apparmor.d/profiles-s-z/slirp4netns @@ -0,0 +1,41 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/slirp4netns +profile slirp4netns @{exec_path} flags=(attach_disconnected) { + include + + 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 +} \ No newline at end of file