siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.89k stars 555 forks source link

refactor: optimize flags and SetLabel #9762

Closed dsseng closed 1 day ago

dsseng commented 2 days ago

Do not do string lookups in repetitive calls. We do not support changing SELinux status during runtime, so once we read this we can assume status does not change.

Also avoid unneeded FS writes when appropriate label is already set on file.

Signed-off-by: Dmitry Sharshakov dmitry.sharshakov@siderolabs.com

dsseng commented 1 day ago

/m