pass-extension-python -> pass-import.

This commit is contained in:
Alexandre Pujol 2021-10-07 14:53:28 +01:00
parent 2fc138a4d7
commit 7a1c462a5e
Failed to generate hash of commit
3 changed files with 37 additions and 30 deletions

View file

@ -1,29 +0,0 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# Confine python based password-store extension. Note: This profile does not
# specify an attachment path because it is intended to be used only via
# "Px -> pass-extension-python" exec transitions from the pass profile.
abi <abi/3.0>,
include <tunables/global>
profile pass-extension-python {
include <abstractions/base>
include <abstractions/python>
include <abstractions/openssl>
/{usr/,}bin/ r,
/{usr/,}bin/pass rPx,
/{usr/,}bin/python3.[0-9]* rix,
/usr/share/file/misc/magic.mgc r,
/tmp/* rw,
owner @{PROC}/@{pid}/fd/ r,
include if exists <local/pass-extension-python>
}

View file

@ -0,0 +1,36 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/pimport
profile pass-import @{exec_path} {
include <abstractions/base>
include <abstractions/python>
include <abstractions/openssl>
@{exec_path} mr,
/{usr/,}bin/ r,
/{usr/,}bin/pass rPx,
/{usr/,}{s,}bin/ldconfig rix,
/{usr/,}bin/gcc rix,
/{usr/,}bin/ld rix,
/{usr/,}bin/python3.[0-9]* rix,
/{usr/,}lib/gcc/**/collect2 rix,
/usr/share/file/misc/magic.mgc r,
owner @{HOME}/.password-store/{,**} rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/*-store/{,**} rw,
owner @{user_config_dirs}/password-store/{,**} rw,
owner /tmp/[a-zA-Z0-9]* rw,
@{PROC}/@{pids}/fd/ r,
include if exists <local/pass-import>
}

View file

@ -116,7 +116,7 @@ pacman-hook-perl complain
pacman-hook-systemd complain
pacman-key complain
pass complain
pass-extension-python complain
pass-import complain
pinentry-gtk-2 complain
pipewire complain
pipewire-media-session complain