2025-01-30 09:24:32 -05:00
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
|
2025-02-06 16:11:10 -05:00
|
|
|
@{fuse_types} = {fuse,fuse.*,fuseblk,fusectl}
|
|
|
|
profile fusermount3 /usr/bin/fusermount3 {
|
2025-01-30 09:24:32 -05:00
|
|
|
include <abstractions/base>
|
2025-04-10 11:14:58 +02:00
|
|
|
include <abstractions/nameservice>
|
2025-01-30 09:24:32 -05:00
|
|
|
|
|
|
|
capability sys_admin,
|
2025-02-06 16:11:10 -05:00
|
|
|
capability dac_read_search,
|
|
|
|
|
2025-02-20 09:42:32 -08:00
|
|
|
# Allow both rw and ro type mounts (e.g. AppImage uses ro)
|
2025-05-05 16:39:09 -07:00
|
|
|
#MS_DIRSYNC, MS_NOATIME, MS_NODIRATIME, MS_NOEXEC, MS_SYNCHRONOUS, MS_NOSYMFOLLOW
|
2025-05-27 15:40:21 -04:00
|
|
|
# Below broad mount flags should be revisited once we have rule delegation
|
|
|
|
mount fstype=@{fuse_types} options=(nosuid,nodev) options in (ro,rw,noatime,dirsync,nodiratime,noexec,sync) -> @{HOME}/**/,
|
|
|
|
mount fstype=@{fuse_types} options=(nosuid,nodev) options in (ro,rw,noatime,dirsync,nodiratime,noexec,sync) -> /mnt/{,**/},
|
|
|
|
mount fstype=@{fuse_types} options=(nosuid,nodev) options in (ro,rw,noatime,dirsync,nodiratime,noexec,sync) -> @{run}/user/@{uid}/**/,
|
|
|
|
mount fstype=@{fuse_types} options=(nosuid,nodev) options in (ro,rw,noatime,dirsync,nodiratime,noexec,sync) -> /media/**/,
|
|
|
|
mount fstype=@{fuse_types} options=(nosuid,nodev) options in (ro,rw,noatime,dirsync,nodiratime,noexec,sync) -> /tmp/**/,
|
2025-05-05 16:39:09 -07:00
|
|
|
# Cern VM fs is special and only uses these exact flags
|
2025-03-20 10:03:14 +00:00
|
|
|
mount fstype=@{fuse_types} options=(nosuid,nodev,ro) -> /cvmfs/**/,
|
2025-02-20 09:42:32 -08:00
|
|
|
|
2025-02-07 09:51:30 -05:00
|
|
|
umount @{HOME}/**/,
|
2025-02-10 10:38:02 -05:00
|
|
|
umount /mnt/{,**/},
|
2025-03-24 12:12:22 -07:00
|
|
|
umount @{run}/user/@{uid}/**/,
|
2025-02-07 09:51:30 -05:00
|
|
|
umount /media/**/,
|
|
|
|
umount /tmp/**/,
|
2025-03-20 10:13:39 +00:00
|
|
|
umount /cvmfs/**/,
|
2025-01-30 09:24:32 -05:00
|
|
|
|
2025-02-27 10:24:09 -08:00
|
|
|
# Flatpak's default cache directory where it mounts a revokefs-fuse
|
|
|
|
mount fstype=fuse options=(nosuid,nodev,rw) /dev/fuse -> /var/tmp/flatpak-cache-*/**/,
|
|
|
|
mount fstype=fuse.revokefs-fuse options=(nosuid,nodev,rw) revokefs-fuse -> /var/tmp/flatpak-cache-*/**/,
|
|
|
|
umount /var/tmp/flatpak-cache-*/**/,
|
|
|
|
|
2025-06-12 11:37:48 -03:00
|
|
|
# flatpak-builder uses rofiles-fuse
|
|
|
|
mount fstype=fuse.rofiles-fuse options=(nosuid,nodev,rw) {rofiles-fuse,/dev/fuse} -> /var/tmp/test-flatpak-*/**/,
|
|
|
|
umount /var/tmp/test-flatpak-*/**/,
|
|
|
|
|
2025-01-30 09:24:32 -05:00
|
|
|
/dev/fuse rw,
|
|
|
|
|
2025-06-11 17:41:00 -03:00
|
|
|
# needed since libfuse 3.17.1-rc0 (LP: #2111845)
|
|
|
|
/usr/bin/mount ix,
|
|
|
|
/usr/bin/umount ix,
|
|
|
|
|
2025-02-06 16:11:10 -05:00
|
|
|
@{etc_ro}/fuse.conf r,
|
2025-06-11 17:41:00 -03:00
|
|
|
@{PROC}/@{pid}/{mounts,mountinfo} r,
|
2025-01-30 09:24:32 -05:00
|
|
|
|
2025-04-28 13:17:49 -07:00
|
|
|
@{exec_path} mr,
|
2025-01-30 09:24:32 -05:00
|
|
|
|
|
|
|
include if exists <local/fusermount3>
|
|
|
|
}
|
2025-02-06 16:11:10 -05:00
|
|
|
|
2025-05-04 23:00:29 +09:00
|
|
|
# vim:ft=apparmor
|