build: set default att to "" when not enabled.
It fixes various issues with multiple / that are not collapsed in they canonical form in file rules See https://gitlab.com/apparmor/apparmor/-/issues/450#note_2158840105
This commit is contained in:
parent
4f9d2703d4
commit
7c6f776757
2 changed files with 2 additions and 4 deletions
|
|
@ -69,7 +69,6 @@
|
||||||
# Default attachment path when re-attached path disconnected path is ignored.
|
# Default attachment path when re-attached path disconnected path is ignored.
|
||||||
# Disabled on abi3 and Ubuntu 25.04+
|
# Disabled on abi3 and Ubuntu 25.04+
|
||||||
# See https://apparmor.pujol.io/development/internal/#re-attached-path
|
# See https://apparmor.pujol.io/development/internal/#re-attached-path
|
||||||
@{att}=/
|
@{att}=""
|
||||||
alias / -> //,
|
|
||||||
|
|
||||||
# vim:syntax=apparmor
|
# vim:syntax=apparmor
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ func (p ReAttach) Apply() ([]string, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
out = strings.ReplaceAll(out, "@{att}=/", "# @{att}=/")
|
out = strings.ReplaceAll(out, `@{att}=""`, `# @{att}=""`)
|
||||||
out = strings.ReplaceAll(out, "alias / -> //,", "#alias / -> //,")
|
|
||||||
return res, path.WriteFile([]byte(out))
|
return res, path.WriteFile([]byte(out))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue