# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/gsettings
profile gsettings @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus-session>
  include <abstractions/dconf-write>

  @{exec_path} mr,

  /usr/share/glib-2.0/schemas/gschemas.compiled r,
  /usr/share/dconf/profile/gdm r,
  /usr/share/gdm/greeter-dconf-defaults r,

  owner @{desktop_cache_dirs}/dconf/user rw,
  owner @{desktop_config_dirs}/dconf/user rw,
  owner @{DESKTOP_HOME}/greeter-dconf-defaults r,

  /dev/tty@{int} rw,

  include if exists <local/gsettings>
}
