Add two profiles directory to have smaller dir.

This commit is contained in:
Alexandre Pujol 2021-09-15 16:55:27 +01:00
parent 6c0ae4ddc1
commit d95a876424
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
521 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}{s,}bin/sfdisk
profile sfdisk @{exec_path} {
include <abstractions/base>
include <abstractions/disks-write>
# Needed to avoid the following error:
# ioctl(3, BLKRRPART) = -1 EACCES (Permission denied)
#
# Checking that no-one is using this disk right now ... FAILED
# This disk is currently in use - repartitioning is probably a bad idea.
# Umount all file systems, and swapoff all swap partitions on this disk.
# Use the --no-reread flag to suppress this check.
capability sys_admin,
@{exec_path} mr,
# For disk images
owner @{HOME}/**.{iso,img,bin,mdf,nrg} rwk,
owner @{MOUNTS}/*/**.{iso,img,bin,mdf,nrg} rwk,
owner @{HOME}/**.{ISO,IMG,BIN,MDF,NRG} rwk,
owner @{MOUNTS}/*/**.{ISO,IMG,BIN,MDF,NRG} rwk,
# For backups
owner @{HOME}/**.{bak,back} rwk,
owner @{MOUNTS}/*/**.{bak,back} rwk,
include if exists <local/sfdisk>
}