feat(profile): add ghc-pkg.

This commit is contained in:
Alexandre Pujol 2024-03-24 20:45:15 +00:00
parent fb841b46c4
commit d8d15c8a35
Failed to generate hash of commit
2 changed files with 31 additions and 2 deletions

View file

@ -64,7 +64,7 @@ profile pacman @{exec_path} {
@{bin}/gdk-pixbuf-query-loaders rPx,
@{bin}/getent rix,
@{bin}/gettext rix,
@{bin}/ghc-pkg-* rix,
@{bin}/ghc-pkg{,-*} rPx,
@{bin}/gio-querymodules rPx,
@{bin}/glib-compile-schemas rPx,
@{bin}/groupadd rPx,
@ -98,7 +98,6 @@ profile pacman @{exec_path} {
@{bin}/update-mime-database rPx,
@{bin}/vercmp rix,
@{bin}/xmlcatalog rix,
@{lib}/ghc-*/bin/ghc-pkg rix,
@{lib}/systemd/systemd-* rPx,
@{lib}/vlc/vlc-cache-gen rPx,
/usr/share/code-features/patch.py rPx,

View file

@ -0,0 +1,30 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/ghc-pkg{,-*}
profile ghc-pkg @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
capability dac_read_search,
@{exec_path} mr,
@{sh_path} rix,
@{lib}/ghc{,-*}/bin/ghc-pkg{,-*} rix,
@{lib}/ghc{,-*}/lib/package.conf.d/* rw,
@{lib}/ghc{,-*}/lib/package.conf.d/package.cache.lock k,
/var/log/haskell-register.log rw,
@{sys}/devices/system/node/ r,
include if exists <local/ghc-pkg>
}