feat(profile): add some new profile.

This commit is contained in:
Alexandre Pujol 2024-05-07 17:25:43 +01:00
parent 239d5efe63
commit fe1e3c3be8
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
10 changed files with 264 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# 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}/alacarte
profile alacarte @{exec_path} {
include <abstractions/base>
include <abstractions/dconf-write>
include <abstractions/desktop>
include <abstractions/python>
@{exec_path} mr,
@{bin}/python3.@{int} rix,
@{lib}/python3.@{int}/site-packages/Alacarte/{,**/}__pycache__/*.cpython-@{int}.*.pyc.@{int} w,
/usr/share/alacarte/{,**} r,
/usr/share/desktop-directories/{,**} r,
/etc/xdg/menus/{,**} r,
owner @{user_config_dirs}/menus/{,**} r,
owner @{user_share_dirs}/applications/{,**} rw,
owner @{user_share_dirs}/desktop-directories/{,**} r,
owner @{tmp}/gdkpixbuf-xpm-tmp.@{rand6} rw,
owner @{PROC}/@{pid}/mounts r,
include if exists <local/alacarte>
}

View file

@ -0,0 +1,32 @@
# 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}/at @{bin}/atq @{bin}/atrm @{bin}/batch
profile at @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
capability fsetid,
signal (send) set=(hup) peer=atd,
@{exec_path} mr,
/etc/at.deny r,
/etc/at.allow r,
/var/spool/cron/atjobs/{,*} rwk,
/var/spool/cron/atspool/{,*} rwk,
@{run}/atd.pid r,
@{PROC}/@{pid}/loginuid r,
include if exists <local/at>
}