mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 05:01:28 +00:00
Merge pull request #15138 from ewindisch/apparmor-fix-test-plus-unconfined
Fix the proc integration test & include missing AA profile
This commit is contained in:
@@ -40,6 +40,9 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
|
||||
file,
|
||||
umount,
|
||||
|
||||
signal (receive) peer=/usr/bin/docker,
|
||||
signal (receive) peer=docker-unconfined,
|
||||
|
||||
deny @{PROC}/sys/fs/** wklx,
|
||||
deny @{PROC}/fs/** wklx,
|
||||
deny @{PROC}/sysrq-trigger rwklx,
|
||||
@@ -60,6 +63,21 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
|
||||
deny /sys/firmware/efi/efivars/** rwklx,
|
||||
deny /sys/kernel/security/** rwklx,
|
||||
}
|
||||
|
||||
profile docker-unconfined flags=(attach_disconnected,mediate_deleted,complain) {
|
||||
#include <abstractions/base>
|
||||
|
||||
network,
|
||||
capability,
|
||||
file,
|
||||
umount,
|
||||
mount,
|
||||
pivot_root,
|
||||
change_profile -> *,
|
||||
|
||||
ptrace,
|
||||
signal,
|
||||
}
|
||||
`
|
||||
|
||||
func generateProfile(out io.Writer) error {
|
||||
|
||||
@@ -198,7 +198,7 @@ func (d *Driver) setPrivileged(container *configs.Config) (err error) {
|
||||
container.Devices = hostDevices
|
||||
|
||||
if apparmor.IsEnabled() {
|
||||
container.AppArmorProfile = "unconfined"
|
||||
container.AppArmorProfile = "docker-unconfined"
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user