feat(profile): add profile for more update-* tools.

This commit is contained in:
Alexandre Pujol 2025-05-25 01:23:26 +02:00
parent 17624b95d8
commit 0a5743fa46
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
4 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{sbin}/update-catalog
profile update-catalog @{exec_path} {
include <abstractions/base>
include <abstractions/perl>
@{exec_path} mr,
/etc/sgml/ r,
/etc/sgml/* r,
/var/lib/sgml-base/*catalog rw,
/var/lib/sgml-base/*catalog.new rw,
/var/lib/sgml-base/*catalog.old w,
include if exists <local/update-catalog>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,24 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{sbin}/update-info-dir
profile update-info-dir @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
@{exec_path} mr,
@{sh_path} r,
@{bin}/install-info Px,
@{bin}/find ix,
@{bin}/rm ix,
include if exists <local/update-info-dir>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,36 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{sbin}/update-shells
profile update-shells @{exec_path} {
include <abstractions/base>
@{exec_path} mr,
@{sh_path} r,
@{bin}/basename ix,
@{bin}/chmod ix,
@{bin}/chown ix,
@{bin}/dirname ix,
@{bin}/dpkg-realpath ix,
@{bin}/mv ix,
@{bin}/sync ix,
/usr/share/debianutils/shells r,
/usr/share/debianutils/shells.d/{,**} r,
/etc/shells r,
/etc/shells.tmp w,
/var/lib/shells.state r,
/var/lib/shells.state.tmp w,
include if exists <local/update-shells>
}
# vim:syntax=apparmor

View file

@ -380,8 +380,11 @@ udev-probe-bcache complain
udisksctl complain udisksctl complain
udisksd attach_disconnected,complain udisksd attach_disconnected,complain
ufw complain ufw complain
update-catalog complain
update-grub complain update-grub complain
update-info-dir complain
update-secureboot-policy complain update-secureboot-policy complain
update-shells complain
userdbctl complain userdbctl complain
utempter attach_disconnected,complain utempter attach_disconnected,complain
veracrypt complain veracrypt complain