feat(fsp): add tunables for the future systemd executor profiles.

This commit is contained in:
Alexandre Pujol 2025-05-17 22:25:27 +02:00
parent 5a448cb39d
commit 8d374ed876
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 4 additions and 0 deletions

View file

@ -9,7 +9,9 @@
# Name of the systemd profiles. Can be `unconfined` or `systemd`, `systemd-user` # Name of the systemd profiles. Can be `unconfined` or `systemd`, `systemd-user`
@{p_systemd}=unconfined @{p_systemd}=unconfined
@{p_systemd_executor}=unconfined
@{p_systemd_user}=unconfined @{p_systemd_user}=unconfined
@{p_systemd_user_executor}=unconfined
# Name of the dbus daemon profiles # Name of the dbus daemon profiles
@{p_dbus_accessibility}=dbus-accessibility @{p_dbus_accessibility}=dbus-accessibility

View file

@ -40,7 +40,9 @@ func (p FullSystemPolicy) Apply() ([]string, error) {
return res, err return res, err
} }
out = strings.ReplaceAll(out, "@{p_systemd}=unconfined", "@{p_systemd}=systemd") out = strings.ReplaceAll(out, "@{p_systemd}=unconfined", "@{p_systemd}=systemd")
out = strings.ReplaceAll(out, "@{p_systemd_executor}=unconfined", "@{p_systemd_executor}=systemd-executor")
out = strings.ReplaceAll(out, "@{p_systemd_user}=unconfined", "@{p_systemd_user}=systemd-user") out = strings.ReplaceAll(out, "@{p_systemd_user}=unconfined", "@{p_systemd_user}=systemd-user")
out = strings.ReplaceAll(out, "@{p_systemd_user_executor}=unconfined", "@{p_systemd_user_executor}=systemd-user-executor")
if err := path.WriteFile([]byte(out)); err != nil { if err := path.WriteFile([]byte(out)); err != nil {
return res, err return res, err
} }