apparmor.d/profiles/gpg-agent

61 lines
1.6 KiB
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# Copyright (C) 2017-2021 Mikhail Morfikov
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
@{exec_path} = /{usr/,}bin/gpg-agent
profile gpg-agent @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
include <abstractions/nameservice-strict>
signal (receive) peer=pinentry-*,
@{exec_path} mr,
/{usr/,}lib/gnupg/scdaemon rPx,
/usr/share/gnupg/* r,
owner @{HOME}/.gnupg/ rw,
owner @{HOME}/.gnupg/gpg-agent.conf r,
owner @{HOME}/.gnupg/private-keys-v1.d/ rw,
owner @{HOME}/.gnupg/private-keys-v1.d/[0-9A-F]*.key rw,
owner /var/lib/*/.gnupg/ rw,
owner /var/lib/*/.gnupg/private-keys-v1.d/ rw,
owner /var/lib/*/.gnupg/private-keys-v1.d/[0-9A-F]*.key rw,
owner /var/lib/*/.gnupg/S.gpg-agent rw,
owner /var/lib/*/gnupg/ rw,
owner /var/lib/*/gnupg/private-keys-v1.d/ rw,
owner /var/lib/*/gnupg/private-keys-v1.d/[0-9A-F]*.key rw,
owner /var/lib/*/gnupg/S.gpg-agent rw,
# For debuild
owner /tmp/dpkg-import-key.*/private-keys-v1.d/ w,
2020-10-25 10:23:34 +01:00
owner @{run}/user/[0-9]*/gnupg/d.*/S.gpg-agent{,.extra,.browser,.ssh} w,
@{PROC}/@{pid}/fd/ r,
# PIN-entry apps
/{usr/,}bin/pinentry-* rPx,
# file_inherit
owner @{HOME}/.xsession-errors w,
# Silencer
deny /{usr/,}bin/.gnupg/ w,
2020-12-10 22:33:39 +01:00
include if exists <local/gpg-agent>
}