mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
build: make debian hide file edditable.
This commit is contained in:
parent
095254864f
commit
cad0b936e5
@ -10,6 +10,14 @@ import (
|
|||||||
"github.com/roddhjav/apparmor.d/pkg/util"
|
"github.com/roddhjav/apparmor.d/pkg/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var Hide = `# This file is generated by "make", all edit will be lost.
|
||||||
|
|
||||||
|
/etc/apparmor.d/usr.bin.firefox
|
||||||
|
/etc/apparmor.d/usr.sbin.cups-browsed
|
||||||
|
/etc/apparmor.d/usr.sbin.cupsd
|
||||||
|
/etc/apparmor.d/usr.sbin.rsyslogd
|
||||||
|
`
|
||||||
|
|
||||||
type Flagger struct{}
|
type Flagger struct{}
|
||||||
|
|
||||||
func (f Flagger) Read(name string) map[string][]string {
|
func (f Flagger) Read(name string) map[string][]string {
|
||||||
@ -76,15 +84,8 @@ func (o Overwriter) Apt(files []string) {
|
|||||||
|
|
||||||
// Clean the debian/apparmor.d.hide file
|
// Clean the debian/apparmor.d.hide file
|
||||||
func (o Overwriter) AptClean() {
|
func (o Overwriter) AptClean() {
|
||||||
const debianHide = `# This file is generated by "make", all edit will be lost.
|
|
||||||
|
|
||||||
/etc/apparmor.d/usr.bin.firefox
|
|
||||||
/etc/apparmor.d/usr.sbin.cups-browsed
|
|
||||||
/etc/apparmor.d/usr.sbin.cupsd
|
|
||||||
/etc/apparmor.d/usr.sbin.rsyslogd
|
|
||||||
`
|
|
||||||
path := DebianDir.Join("apparmor.d.hide")
|
path := DebianDir.Join("apparmor.d.hide")
|
||||||
if err := path.WriteFile([]byte(debianHide)); err != nil {
|
if err := path.WriteFile([]byte(Hide)); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user