apparmor.d/apparmor.d/groups/ssh/sshfs
Alexandre Pujol b79a1fcd31
feat(profile): general update.
Also include some preparation for the systemd profile.
2023-11-19 11:08:35 +00:00

51 lines
1.1 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Mikhail Morfikov
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/sshfs
profile sshfs @{exec_path} flags=(complain) {
include <abstractions/base>
mount fstype=fuse.sshfs -> @{HOME}/*/,
mount fstype=fuse.sshfs -> @{HOME}/*/*/,
unix (connect, send, receive) type=stream peer=(label="sshfs//fusermount",addr=none),
@{exec_path} mr,
@{bin}/ssh rPx,
@{bin}/fusermount{,3} rCx -> fusermount,
@{PROC}/sys/fs/pipe-max-size r,
/dev/fuse rw,
profile fusermount flags=(complain) {
include <abstractions/base>
include <abstractions/nameservice-strict>
capability sys_admin,
mount fstype={fuse,fuse.sshfs} -> @{HOME}/*/,
mount fstype={fuse,fuse.sshfs} -> @{HOME}/*/*/,
unix (connect, send, receive) type=stream peer=(label="sshfs",addr=none),
@{bin}/fusermount{,3} mr,
/etc/fuse.conf r,
@{PROC}/@{pid}/mounts r,
/dev/fuse rw,
include if exists <local/sshfs_fusermount>
}
include if exists <local/sshfs>
}