feat: prefix variables that refer to a profile

This commit is contained in:
Alexandre Pujol 2024-04-02 13:41:08 +01:00
parent 751bc683d9
commit 6dd0c36e9a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
39 changed files with 57 additions and 49 deletions

View file

@ -39,8 +39,8 @@ func (p FullSystemPolicy) Apply() ([]string, error) {
if err != nil {
return res, err
}
out := strings.Replace(string(content), "@{systemd}=unconfined", "@{systemd}=systemd", -1)
out = strings.Replace(out, "@{systemd_user}=unconfined", "@{systemd_user}=systemd-user", -1)
out := strings.Replace(string(content), "@{p_systemd}=unconfined", "@{p_systemd}=systemd", -1)
out = strings.Replace(out, "@{p_systemd_user}=unconfined", "@{p_systemd_user}=systemd-user", -1)
if err := path.WriteFile([]byte(out)); err != nil {
return res, err
}