mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-16 00:13:48 +01:00
78 lines
1.7 KiB
Plaintext
78 lines
1.7 KiB
Plaintext
# vim:syntax=apparmor
|
|
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{SYNC_DIR} = @{HOME}/Sync/
|
|
@{SYNC_DIR} += /media/*/syncthing/
|
|
|
|
@{exec_path} = /{usr/,}bin/syncthing
|
|
profile syncthing @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/ssl_certs>
|
|
include <abstractions/deny-root-dir-access>
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
network netlink raw,
|
|
|
|
@{exec_path} mrix,
|
|
|
|
/{usr/,}bin/xdg-open rCx -> open,
|
|
/{usr/,}bin/ip rix,
|
|
|
|
owner @{HOME}/ r,
|
|
owner @{HOME}/.config/syncthing/ rw,
|
|
owner @{HOME}/.config/syncthing/** rwk,
|
|
|
|
@{SYNC_DIR}/{,**} rw,
|
|
|
|
/etc/mime.types r,
|
|
|
|
@{PROC}/sys/net/core/somaxconn r,
|
|
|
|
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
|
|
|
|
# Silecne the noise
|
|
deny /etc/ssl/certs/java/ r,
|
|
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/xdg-open>
|
|
|
|
/{usr/,}bin/xdg-open mr,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
/{usr/,}bin/gawk rix,
|
|
/{usr/,}bin/readlink rix,
|
|
/{usr/,}bin/basename rix,
|
|
|
|
owner @{HOME}/ r,
|
|
|
|
owner @{run}/user/[0-9]*/ r,
|
|
|
|
# Allowed apps to open
|
|
/{usr/,}lib/firefox/firefox rPUx,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
}
|
|
|
|
include if exists <local/syncthing>
|
|
}
|