2022-02-05 21:57:49 +01:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
2024-02-07 00:16:21 +01:00
|
|
|
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
|
2022-02-05 21:57:49 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
abi <abi/3.0>,
|
|
|
|
|
|
|
|
include <tunables/global>
|
|
|
|
|
2023-07-09 15:59:53 +02:00
|
|
|
@{exec_path} = @{bin}/s3fs
|
2022-02-05 21:57:49 +01:00
|
|
|
profile s3fs @{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,
|
|
|
|
|
2022-06-12 23:51:37 +02:00
|
|
|
mount fstype=fuse.s3fs -> @{MOUNTS}/,
|
2022-02-05 21:57:49 +01:00
|
|
|
mount fstype=fuse.s3fs -> @{MOUNTS}/*/,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/fusermount{,3} rCx -> fusermount,
|
2022-02-05 21:57:49 +01:00
|
|
|
|
2022-03-02 19:15:33 +01:00
|
|
|
/etc/mime.types r,
|
2022-02-05 21:57:49 +01:00
|
|
|
/etc/passwd-s3fs r,
|
|
|
|
|
|
|
|
owner @{HOME}/.passwd-s3fs r,
|
|
|
|
|
2022-06-12 23:51:37 +02:00
|
|
|
owner @{MOUNTS}/ r,
|
2022-03-02 19:15:33 +01:00
|
|
|
owner @{MOUNTS}/*/ r,
|
|
|
|
owner /tmp/* rw,
|
2022-02-05 21:57:49 +01:00
|
|
|
|
|
|
|
/dev/fuse rw,
|
|
|
|
|
2022-03-02 19:15:33 +01:00
|
|
|
profile fusermount {
|
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
|
2023-01-27 23:31:55 +01:00
|
|
|
capability dac_read_search,
|
2022-03-02 19:15:33 +01:00
|
|
|
capability sys_admin,
|
|
|
|
|
|
|
|
network inet stream,
|
|
|
|
network inet6 stream,
|
|
|
|
|
2023-01-27 23:31:55 +01:00
|
|
|
mount fstype=fuse.s3fs -> @{MOUNTS}/,
|
|
|
|
mount fstype=fuse.s3fs -> @{MOUNTS}/*/,
|
|
|
|
|
|
|
|
umount @{MOUNTS}/,
|
|
|
|
umount @{MOUNTS}/*/,
|
|
|
|
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/fusermount{,3} mr,
|
2022-03-02 19:15:33 +01:00
|
|
|
|
|
|
|
/etc/fuse.conf r,
|
|
|
|
|
2022-06-12 23:51:37 +02:00
|
|
|
@{MOUNTS}/ r,
|
2022-03-02 19:15:33 +01:00
|
|
|
@{MOUNTS}/*/ r,
|
|
|
|
|
2022-04-13 23:04:36 +02:00
|
|
|
owner /tmp/s3fstmp.* rw,
|
|
|
|
|
2022-03-02 19:15:33 +01:00
|
|
|
@{PROC}/@{pids}/mounts r,
|
|
|
|
|
|
|
|
/dev/fuse rw,
|
2023-11-09 18:31:45 +01:00
|
|
|
|
|
|
|
include if exists <local/s3fs_fusermount>
|
2022-03-02 19:15:33 +01:00
|
|
|
}
|
|
|
|
|
2022-02-05 21:57:49 +01:00
|
|
|
include if exists <local/s3fs>
|
|
|
|
}
|