2023-04-19 18:40:40 +02:00
|
|
|
// apparmor.d - Full set of apparmor profiles
|
|
|
|
// Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
package aa
|
2023-08-18 00:00:52 +02:00
|
|
|
// AppArmorProfiles represents a full set of apparmor profiles
|
|
|
|
type AppArmorProfiles map[string]*AppArmorProfile
|
2023-04-19 18:40:40 +02:00
|
|
|
|
2023-08-18 00:00:52 +02:00
|
|
|
// ApparmorProfile represents a full apparmor profile.
|
|
|
|
// Warning: close to the BNF grammar of apparmor profile but not exactly the same (yet):
|
|
|
|
// - Some rules are not supported yet (subprofile, hat...)
|
|
|
|
// - The structure is simplified as it only aims at writting profile, not parsing it.
|
2023-04-19 18:40:40 +02:00
|
|
|
type AppArmorProfile struct {
|
2023-08-18 00:00:52 +02:00
|
|
|
Preamble
|
|
|
|
Profile
|
2023-04-19 18:40:40 +02:00
|
|
|
}
|
|
|
|
|
2023-07-25 23:01:07 +02:00
|
|
|
func NewAppArmorProfile() *AppArmorProfile {
|
2023-08-18 00:00:52 +02:00
|
|
|
return &AppArmorProfile{}
|
2023-04-19 18:40:40 +02:00
|
|
|
}
|