mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-30 14:55:15 +01:00
ssh: better keys & network access.
This commit is contained in:
parent
093af6982b
commit
660921f57c
2 changed files with 14 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
@ -15,6 +16,9 @@ profile ssh @{exec_path} {
|
|||
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network inet dgram,
|
||||
network inet6 dgram,
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
|
@ -23,8 +27,8 @@ profile ssh @{exec_path} {
|
|||
owner @{HOME}/@{XDG_SSH_DIR}/ r,
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/config r,
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/known_hosts r,
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/*_rsa{,.pub} r,
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/*_ed25519{,.pub} r,
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/*_*{,.pub} r,
|
||||
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/ssh/{,*} r,
|
||||
|
||||
/etc/ssh/ssh_config r,
|
||||
/etc/ssh/ssh_config.d/ r,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2018-2021 Mikhail Morfikov
|
||||
# 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
@ -22,6 +23,11 @@ profile ssh-agent @{exec_path} {
|
|||
/{usr/,}bin/sway rPUx,
|
||||
/{usr/,}bin/enlightenment_start rPUx,
|
||||
|
||||
# SSH keys
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/ rw,
|
||||
owner @{HOME}/@{XDG_SSH_DIR}/* r,
|
||||
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/ssh/{,*} r,
|
||||
|
||||
# When started via systemd
|
||||
@{run}/user/[0-9]*/openssh_agent rw,
|
||||
|
||||
|
@ -34,5 +40,7 @@ profile ssh-agent @{exec_path} {
|
|||
owner /dev/tty[0-9]* rw,
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
||||
@{run}/user/1000/keyring/.ssh rw,
|
||||
|
||||
include if exists <local/ssh-agent>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue