mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-24 14:06:47 +01:00
build: add a --abi4 build flags.
convert the profiles to Apparmor abi/4.0
This commit is contained in:
parent
64a5dea47e
commit
8f1052546e
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,7 @@ Options:
|
|||
-f, --full Set AppArmor for full system policy.
|
||||
-c, --complain Set complain flag on all profiles.
|
||||
-e, --enforce Set enforce flag on all profiles.
|
||||
--abi4 Convert the profiles to Apparmor abi/4.0.
|
||||
`
|
||||
|
||||
var (
|
||||
|
@ -29,6 +30,7 @@ var (
|
|||
full bool
|
||||
complain bool
|
||||
enforce bool
|
||||
abi4 bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -40,6 +42,7 @@ func init() {
|
|||
flag.BoolVar(&complain, "complain", false, "Set complain flag on all profiles.")
|
||||
flag.BoolVar(&enforce, "e", false, "Set enforce flag on all profiles.")
|
||||
flag.BoolVar(&enforce, "enforce", false, "Set enforce flag on all profiles.")
|
||||
flag.BoolVar(&abi4, "abi4", false, "Convert the profiles to Apparmor abi/4.0.")
|
||||
}
|
||||
|
||||
func aaPrebuild() error {
|
||||
|
@ -56,6 +59,9 @@ func aaPrebuild() error {
|
|||
} else if enforce {
|
||||
prebuild.Builds = append(prebuild.Builds, prebuild.BuildEnforce)
|
||||
}
|
||||
if abi4 {
|
||||
prebuild.Builds = append(prebuild.Builds, prebuild.BuildABI3)
|
||||
}
|
||||
|
||||
if err := prebuild.Prepare(); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue