]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security_util: Don't error on macOS when getting/setting/moving XATTRs
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Nov 2020 20:40:18 +0000 (21:40 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 6 Nov 2020 08:04:35 +0000 (09:04 +0100)
commitd337543f06e43006869310adc3c0e60d76516ca9
tree138eaa1461f020528a13dc1ffeef1a18d021f796
parent8f0f6ff08211ace1dabc2c6a93befe60edaa97e1
security_util: Don't error on macOS when getting/setting/moving XATTRs

There are three internal APIs implemented in this security_util
file: virSecurityGetRememberedLabel(),
virSecuritySetRememberedLabel() and
virSecurityMoveRememberedLabel() for getting, setting and moving
remembered seclabel. All three have a special return value of -2
when XATTRs are not supported (for whatever reason) and callers
are expected to handle it gracefully. However, after my commit of
v5.7.0-rc1~115 it may happen that one of the three functions
returned -1 even though XATTRs are not supported (and thus -2
should have been returned).

Fixes: 7cfb7aab573a031880a1f4fd20747843fea109ba
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/security/security_util.c