apparmor.d/apparmor.d/profiles-s-z/syncthing
2024-04-09 23:48:33 +01:00

46 lines
1.0 KiB
Plaintext

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/syncthing
profile syncthing @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/ssl_certs>
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} mrix,
@{open_path} rPx -> child-open,
@{bin}/ip rix,
/usr/share/mime/{,**} r,
/etc/mime.types r,
owner @{HOME}/ r,
owner @{HOME}/@{XDG_DATA_DIR}/syncthing/{,**} rwk,
owner @{user_config_dirs}/syncthing/{,**} rwk,
owner @{user_state_dirs}/syncthing/{,**} rwk,
/home/ r,
@{user_sync_dirs}/{,**} rw,
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
@{PROC}/sys/net/core/somaxconn r,
@{PROC}/@{pids}/net/route r,
include if exists <local/syncthing>
}