On a Monday in 2025, Peter Krempa via Devel wrote:
>Some cleanups resutling from analyzing some selinux code.
>
>Peter Krempa (19):
> security/security_driver.c/h: Fix function header formatting
> virSecuritySELinuxTransactionRun: Refactor cleanup
> virSecuritySELinuxMCSFind: Refactor variable clearing
> virSecuritySELinuxRestoreFileLabel: Refactor cleanup
> virSecuritySELinux(Set|Restore)TPMFileLabel: Automatically free
> 'cancel_path'
> virSecuritySELinuxRestoreFileLabels: Refactor variable freeing
> virSecuritySELinux(Set|Restore)HostdevCapsLabel: Refactor cleanup
> virSecuritySELinux(Set|Restore)ChardevLabel: Refactor cleanup
> virSecuritySELinuxSet(Daemon)SocketLabel: Refactor cleanup
> virSecuritySELinuxSetTapFDLabel: Refactor cleanup
> security_selinux: Declare internal autoptr cleanup helper for
> 'context_t'
> virSecuritySELinuxContextAddRange: Refactor cleanup of 'context_t'
> virSecuritySELinuxGenNewContext: Refactor cleanup
> virSecuritySELinuxReserveLabel: Refactor cleanup
> virSecuritySELinuxGetProcessLabel: Automatically free 'ctx' temp
> variable
> virSecuritySELinuxSetFilecon: Automatically free 'econ' temp variable
> virSecuritySELinuxRestoreInputLabel: Return values directly
> virSecuritySELinuxGenImageLabel: Refactor cleanup
> virSecuritySELinuxGetSecurityMountOptions: refactor printing
>
> src/security/security_driver.c | 5 +-
> src/security/security_driver.h | 5 +-
> src/security/security_selinux.c | 347 +++++++++++++-------------------
> 3 files changed, 149 insertions(+), 208 deletions(-)
>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Jano