On 3/28/19 11:04 AM, Michal Privoznik wrote:
Firstly, there's no reason to enumerate all XATTRs since they differ only in the prefix and we can construct them in a loop.
Secondly, and more importantly, the script was still looking for just one prefix "trusted.libvirt.security" even on FreeBSD.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tools/libvirt_recover_xattrs.sh | 49 +++++++++++++++++---------------- 1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/tools/libvirt_recover_xattrs.sh b/tools/libvirt_recover_xattrs.sh index 69dfca0160..3302fca60e 100755 --- a/tools/libvirt_recover_xattrs.sh +++ b/tools/libvirt_recover_xattrs.sh @@ -23,14 +23,17 @@ EOF
QUIET=0 DRY_RUN=0 -P="/" +DIR="/"
# So far only qemu and lxc drivers use security driver. URI=("qemu:///system" "qemu:///session" "lxc:///system")
The xattr stuff is disabled for qemu:///session right, so maybe this can be dropped too. I struggle to review shell code but this looks fine to me and it didn't fall over when I ran it, so: Reviewed-by: Cole Robinson <crobinso@redhat.com> - Cole