Add gjs profile.

This commit is contained in:
Alexandre Pujol 2021-04-02 00:01:15 +01:00
parent 59d33e0cc6
commit efe56f3841
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC

View File

@ -0,0 +1,55 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-3.0-or-later
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/gjs-console
profile gjs-console @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/openssl>
include <abstractions/gtk>
include <abstractions/fonts>
include <abstractions/freedesktop.org>
@{exec_path} mr,
/{usr/,}bin/ r,
/{usr/,}bin/[a-z0-9]* rPix,
/usr/{lib,libexec}/** rPix,
/usr/share/gnome-shell/{,**} r,
/usr/share/themes/*/gtk-3.0/{,**} r,
/usr/share/gdm/greeter-dconf-defaults r,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/usr/share/X11/xkb/** r,
/usr/share/dconf/profile/gdm r,
/var/lib/gdm/.config/dconf/user r,
/var/lib/gdm/.cache/gstreamer-1.0/ rw,
/var/lib/gdm/.cache/gstreamer-1.0/registry.*.bin{,.tmp*} rw,
owner @{user_share_dirs}/gnome-shell/extensions/{,**} r,
owner @{user_cache_dirs}/gstreamer-1.0/ rw,
owner @{user_cache_dirs}/gstreamer-1.0/registry.*.bin{,.tmp*} rw,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/task/ r,
owner @{PROC}/@{pid}/task/@{tid}/stat r,
owner @{PROC}/@{pid}/mounts r,
owner @{PROC}/@{pid}/stat r,
include <abstractions/dconf>
owner @{run}/user/[0-9]*/dconf/ rw,
owner @{run}/user/[0-9]*/dconf/user rw,
@{run}/user/[0-9]*/gdm/Xauthority r,
/dev/ r,
/dev/dri/ r,
/dev/tty rw,
/dev/tty[0-9]* rw,
include if exists <local/gjs-console>
}