Add tailscale profiles.

This commit is contained in:
Alexandre Pujol 2022-01-09 20:24:35 +01:00
parent 2e7b6f8ba8
commit 065dad53e3
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
3 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,31 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/tailscale
profile tailscale @{exec_path} {
include <abstractions/base>
ptrace (read),
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} mr,
/{usr/,}bin/ip rPx,
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
@{PROC}/ r,
@{PROC}/@{pids}/stat r,
include if exists <local/tailscale>
}

View File

@ -0,0 +1,57 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}{,s}bin/tailscaled
profile tailscaled @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/ssl_certs>
capability dac_read_search,
capability mknod,
capability net_admin,
capability sys_ptrace,
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
ptrace (read),
@{exec_path} mr,
/{usr/,}bin/ip rix,
/{usr/,}{s,}bin/xtables-nft-multi rix,
/{usr/,}bin/systemctl rPx -> child-systemctl,
/etc/iproute2/rt_tables r,
owner /var/lib/tailscale/{,**} rw,
owner @{run}/tailscale/{,**} rw,
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
@{PROC}/ r,
@{PROC}/@{pid}/mounts r,
@{PROC}/@{pid}/net/{,**} r,
@{PROC}/sys/net/{,**} r,
@{PROC}/@{pids}/cmdline r,
@{PROC}/@{pids}/fd/ r,
@{PROC}/1/cgroup r,
@{PROC}/1/stat r,
@{PROC}/1/environ r,
@{PROC}/cmdline r,
@{PROC}/sys/kernel/osrelease r,
/dev/net/tun rw,
include if exists <local/tailscaled>
}

View File

@ -181,6 +181,8 @@ systemd-userwork complain
systemd-vconsole-setup complain
systemd-xdg-autostart-condition complain
systemd-xdg-autostart-generator complain
tailscale complain
tailscaled complain
timedatectl complain
tracker-extract complain
udisksctl complain