mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
Add initial cockpit profiles.
This commit is contained in:
parent
1a31d8271e
commit
a2dc5b1132
16
apparmor.d/groups/virt/cockpit-askpass
Normal file
16
apparmor.d/groups/virt/cockpit-askpass
Normal file
@ -0,0 +1,16 @@
|
||||
# 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/,}lib/cockpit/cockpit-askpass
|
||||
profile cockpit-askpass @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/cockpit-askpass>
|
||||
}
|
58
apparmor.d/groups/virt/cockpit-bridge
Normal file
58
apparmor.d/groups/virt/cockpit-bridge
Normal file
@ -0,0 +1,58 @@
|
||||
# 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/cockpit-bridge
|
||||
profile cockpit-bridge @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/app-launcher-root>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/consoles>
|
||||
|
||||
capability dac_read_search,
|
||||
capability sys_nice,
|
||||
|
||||
network inet dgram,
|
||||
network inet stream,
|
||||
network inet6 dgram,
|
||||
network inet6 stream,
|
||||
|
||||
signal (send) set=term peer=dbus-daemon,
|
||||
signal (send) set=term peer=ssh-agent,
|
||||
signal (send) set=term peer=sudo,
|
||||
signal (send) set=term peer=unconfined,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/journalctl rPx,
|
||||
|
||||
/usr/share/cockpit/{,**} r,
|
||||
|
||||
/etc/cockpit/{,**} r,
|
||||
/etc/machine-id r,
|
||||
/etc/motd r,
|
||||
/etc/shadow r,
|
||||
|
||||
owner @{user_cache_dirs}/ssh-agent.[0-9A-Z]* rw,
|
||||
|
||||
@{run}/systemd/userdb/ r,
|
||||
@{run}/user/@{uid}/ssh-agent.[0-9A-Z]* rw,
|
||||
@{run}/utmp r,
|
||||
|
||||
owner @{PROC}/@{pid}/cgroup r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
@{PROC}/@{pids}/net/dev r,
|
||||
@{PROC}/1/cgroup r,
|
||||
@{PROC}/diskstats r,
|
||||
@{PROC}/sys/kernel/random/boot_id r,
|
||||
@{PROC}/uptime r,
|
||||
|
||||
/dev/ptmx rw,
|
||||
|
||||
include if exists <local/cockpit-bridge>
|
||||
}
|
18
apparmor.d/groups/virt/cockpit-certificate-ensure
Normal file
18
apparmor.d/groups/virt/cockpit-certificate-ensure
Normal file
@ -0,0 +1,18 @@
|
||||
# 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/,}lib/cockpit/cockpit-certificate-ensure
|
||||
profile cockpit-certificate-ensure @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/cockpit/ws-certs.d/{,*} r,
|
||||
|
||||
include if exists <local/cockpit-certificate-ensure>
|
||||
}
|
16
apparmor.d/groups/virt/cockpit-certificate-helper
Normal file
16
apparmor.d/groups/virt/cockpit-certificate-helper
Normal file
@ -0,0 +1,16 @@
|
||||
# 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/,}lib/cockpit/cockpit-certificate-helper
|
||||
profile cockpit-certificate-helper @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/cockpit-certificate-helper>
|
||||
}
|
16
apparmor.d/groups/virt/cockpit-desktop
Normal file
16
apparmor.d/groups/virt/cockpit-desktop
Normal file
@ -0,0 +1,16 @@
|
||||
# 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/,}lib/cockpit/cockpit-desktop
|
||||
profile cockpit-desktop @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/cockpit-desktop>
|
||||
}
|
49
apparmor.d/groups/virt/cockpit-session
Normal file
49
apparmor.d/groups/virt/cockpit-session
Normal file
@ -0,0 +1,49 @@
|
||||
# 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/,}lib/cockpit/cockpit-session
|
||||
profile cockpit-session @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/authentication>
|
||||
|
||||
capability audit_write,
|
||||
capability dac_read_search,
|
||||
capability net_admin,
|
||||
capability setgid,
|
||||
capability setuid,
|
||||
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/{,z,ba,da}sh rix,
|
||||
/{usr/,}bin/cockpit-bridge rPx,
|
||||
|
||||
/etc/environment r,
|
||||
/etc/group r,
|
||||
/etc/motd r,
|
||||
/etc/security/limits.d/{,*.conf} r,
|
||||
/etc/shells r,
|
||||
|
||||
@{run}/faillock/[a-zA-z0-9]* rwk,
|
||||
@{run}/systemd/sessions/[0-9].ref rw,
|
||||
@{run}/systemd/userdb/ r,
|
||||
@{run}/utmp rwk,
|
||||
|
||||
/var/log/btmp rw,
|
||||
/var/log/lastlog rw,
|
||||
/var/log/wtmp rwk,
|
||||
|
||||
owner @{PROC}/@{pid}/loginuid rw,
|
||||
owner @{PROC}/@{pid}/uid_map r,
|
||||
@{PROC}/@{pids}/fd/ r,
|
||||
@{PROC}/sys/kernel/random/boot_id r,
|
||||
|
||||
include if exists <local/cockpit-session>
|
||||
}
|
16
apparmor.d/groups/virt/cockpit-ssh
Normal file
16
apparmor.d/groups/virt/cockpit-ssh
Normal file
@ -0,0 +1,16 @@
|
||||
# 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/,}lib/cockpit/cockpit-ssh
|
||||
profile cockpit-ssh @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/cockpit-ssh>
|
||||
}
|
20
apparmor.d/groups/virt/cockpit-tls
Normal file
20
apparmor.d/groups/virt/cockpit-tls
Normal file
@ -0,0 +1,20 @@
|
||||
# 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/,}lib/cockpit/cockpit-tls
|
||||
profile cockpit-tls @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
network inet6 stream,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/cockpit/ws-certs.d/{,**} r,
|
||||
|
||||
include if exists <local/cockpit-tls>
|
||||
}
|
24
apparmor.d/groups/virt/cockpit-ws
Normal file
24
apparmor.d/groups/virt/cockpit-ws
Normal file
@ -0,0 +1,24 @@
|
||||
# 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/,}lib/cockpit/cockpit-ws
|
||||
profile cockpit-ws @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}lib/cockpit/cockpit-session rPx,
|
||||
|
||||
/usr/share/cockpit/{,**} r,
|
||||
/etc/cockpit/ws-certs.d/ r,
|
||||
|
||||
owner @{PROC}/@{pid}/cgroup r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
|
||||
include if exists <local/cockpit-ws>
|
||||
}
|
16
apparmor.d/groups/virt/cockpit-wsinstance-factory
Normal file
16
apparmor.d/groups/virt/cockpit-wsinstance-factory
Normal file
@ -0,0 +1,16 @@
|
||||
# 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/,}lib/cockpit/cockpit-wsinstance-factory
|
||||
profile cockpit-wsinstance-factory @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/cockpit-wsinstance-factory>
|
||||
}
|
@ -12,7 +12,16 @@ bootctl complain
|
||||
borg complain
|
||||
cfdisk complain
|
||||
cgdisk complain
|
||||
|
||||
cockpit-askpass complain
|
||||
cockpit-bridge complain
|
||||
cockpit-certificate-ensure complain
|
||||
cockpit-certificate-helper complain
|
||||
cockpit-desktop complain
|
||||
cockpit-session attach_disconnected,complain
|
||||
cockpit-ssh complain
|
||||
cockpit-tls complain
|
||||
cockpit-ws complain
|
||||
cockpit-wsinstance-factory complain
|
||||
dbus-daemon-launch-helper complain
|
||||
dbus-run-session complain
|
||||
dkms complain
|
||||
|
Loading…
Reference in New Issue
Block a user