diff --git a/pkg/prebuild/cfg/files.go b/pkg/prebuild/cfg/files.go index 90acc2d8..6d635d65 100644 --- a/pkg/prebuild/cfg/files.go +++ b/pkg/prebuild/cfg/files.go @@ -10,6 +10,14 @@ import ( "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{} 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 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") - if err := path.WriteFile([]byte(debianHide)); err != nil { + if err := path.WriteFile([]byte(Hide)); err != nil { panic(err) } }