From 8e34c5968b7134dc6f8768dc0f70d247975712c9 Mon Sep 17 00:00:00 2001 From: beroal Date: Sun, 6 Mar 2022 16:05:37 +0200 Subject: [PATCH] Add ssh-keygen (#35) --- apparmor.d/groups/ssh/ssh-keygen | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 apparmor.d/groups/ssh/ssh-keygen diff --git a/apparmor.d/groups/ssh/ssh-keygen b/apparmor.d/groups/ssh/ssh-keygen new file mode 100644 index 00000000..b4cf2297 --- /dev/null +++ b/apparmor.d/groups/ssh/ssh-keygen @@ -0,0 +1,23 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Roman Beslik +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/ssh-keygen + +profile ssh-keygen @{exec_path} { + include + include + include + include # for entering a passphrase for a key + + @{exec_path} mr, + + owner @{HOME}/@{XDG_SSH_DIR}/ w, + owner @{HOME}/@{XDG_SSH_DIR}/*_*{,.pub} rw, + + include if exists +}