import perl-Sys-Virt-6.0.0-1.module+el8.3.0+6423+e4cb6418
This commit is contained in:
parent
bbcbc6cc59
commit
efaeb36a1b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/Sys-Virt-v4.5.0.tar.gz
|
||||
SOURCES/Sys-Virt-v6.0.0.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
8e69ddc32a5f61ad5730859cf312808a3daab5a0 SOURCES/Sys-Virt-v4.5.0.tar.gz
|
||||
0a4b1ce47a79fa9743dfc3cfd66661972728ca2a SOURCES/Sys-Virt-v6.0.0.tar.gz
|
||||
|
@ -1,126 +0,0 @@
|
||||
From d5ae3d1db19b52676489c2312efd21ab5e86aee4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 14 Aug 2018 11:46:08 +0100
|
||||
Subject: [PATCH] Add NWFilterBinding.pm module missed in dist
|
||||
|
||||
---
|
||||
lib/Sys/Virt/NWFilterBinding.pm | 107 ++++++++++++++++++++++++++++++++
|
||||
1 file changed, 107 insertions(+)
|
||||
create mode 100644 lib/Sys/Virt/NWFilterBinding.pm
|
||||
|
||||
diff --git a/lib/Sys/Virt/NWFilterBinding.pm b/lib/Sys/Virt/NWFilterBinding.pm
|
||||
new file mode 100644
|
||||
index 0000000..2c56b3f
|
||||
--- /dev/null
|
||||
+++ b/lib/Sys/Virt/NWFilterBinding.pm
|
||||
@@ -0,0 +1,107 @@
|
||||
+# -*- perl -*-
|
||||
+#
|
||||
+# Copyright (C) 2018 Red Hat
|
||||
+#
|
||||
+# This program is free software; You can redistribute it and/or modify
|
||||
+# it under either:
|
||||
+#
|
||||
+# a) the GNU General Public License as published by the Free
|
||||
+# Software Foundation; either version 2, or (at your option) any
|
||||
+# later version,
|
||||
+#
|
||||
+# or
|
||||
+#
|
||||
+# b) the "Artistic License"
|
||||
+#
|
||||
+# The file "LICENSE" distributed along with this file provides full
|
||||
+# details of the terms and conditions of the two licenses.
|
||||
+
|
||||
+=pod
|
||||
+
|
||||
+=head1 NAME
|
||||
+
|
||||
+Sys::Virt::NWFilterBinding - Represent & manage a network filter binding
|
||||
+
|
||||
+=head1 DESCRIPTION
|
||||
+
|
||||
+The C<Sys::Virt::NWFilterBinding> module represents a binding between a
|
||||
+network filter and a network port device.
|
||||
+
|
||||
+=head1 METHODS
|
||||
+
|
||||
+=over 4
|
||||
+
|
||||
+=cut
|
||||
+
|
||||
+package Sys::Virt::NWFilterBinding;
|
||||
+
|
||||
+use strict;
|
||||
+use warnings;
|
||||
+
|
||||
+
|
||||
+sub _new {
|
||||
+ my $proto = shift;
|
||||
+ my $class = ref($proto) || $proto;
|
||||
+ my %params = @_;
|
||||
+
|
||||
+ my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required";
|
||||
+ my $self;
|
||||
+ if (exists $params{portdev}) {
|
||||
+ $self = Sys::Virt::NWFilterBinding::_lookup_by_port_dev($con, $params{portdev});
|
||||
+ } elsif (exists $params{xml}) {
|
||||
+ $self = Sys::Virt::NWFilterBinding::_create_xml($con, $params{xml});
|
||||
+ } else {
|
||||
+ die "portdev or xml parameters are required";
|
||||
+ }
|
||||
+
|
||||
+ bless $self, $class;
|
||||
+
|
||||
+ return $self;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+=item my $name = $binding->get_port_dev()
|
||||
+
|
||||
+Returns a string with the name of the network port device that is bound to
|
||||
+
|
||||
+=item my $name = $binding->get_filter_name()
|
||||
+
|
||||
+Returns a string with the name of the network filter that is bound to
|
||||
+
|
||||
+=item my $xml = $binding->get_xml_description()
|
||||
+
|
||||
+Returns an XML document containing a complete description of
|
||||
+the network's configuration
|
||||
+
|
||||
+=item $binding->delete()
|
||||
+
|
||||
+Unbind the network port device from the filter
|
||||
+
|
||||
+=cut
|
||||
+
|
||||
+
|
||||
+1;
|
||||
+
|
||||
+=back
|
||||
+
|
||||
+=head1 AUTHORS
|
||||
+
|
||||
+Daniel P. Berrange <berrange@redhat.com>
|
||||
+
|
||||
+=head1 COPYRIGHT
|
||||
+
|
||||
+Copyright (C) 2018 Red Hat
|
||||
+
|
||||
+=head1 LICENSE
|
||||
+
|
||||
+This program is free software; you can redistribute it and/or modify
|
||||
+it under the terms of either the GNU General Public License as published
|
||||
+by the Free Software Foundation (either version 2 of the License, or at
|
||||
+your option any later version), or, the Artistic License, as specified
|
||||
+in the Perl README file.
|
||||
+
|
||||
+=head1 SEE ALSO
|
||||
+
|
||||
+L<Sys::Virt>, L<Sys::Virt::Error>, C<http://libvirt.org>
|
||||
+
|
||||
+=cut
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 9ae7dd0dd0c15dc88ea7e5caf9d29e6fa0630d4c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Thu, 26 Jul 2018 10:30:01 +0100
|
||||
Subject: [PATCH] Add missing import of NWFilterBinding
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit fb72cb23fe654d28e7c4027985552cd3b7ca53a0)
|
||||
---
|
||||
lib/Sys/Virt.pm | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/Sys/Virt.pm b/lib/Sys/Virt.pm
|
||||
index e0b0d77..302a748 100644
|
||||
--- a/lib/Sys/Virt.pm
|
||||
+++ b/lib/Sys/Virt.pm
|
||||
@@ -75,6 +75,7 @@ use Sys::Virt::NodeDevice;
|
||||
use Sys::Virt::Interface;
|
||||
use Sys::Virt::Secret;
|
||||
use Sys::Virt::NWFilter;
|
||||
+use Sys::Virt::NWFilterBinding;
|
||||
use Sys::Virt::DomainSnapshot;
|
||||
use Sys::Virt::Stream;
|
||||
|
@ -1,67 +0,0 @@
|
||||
From 1dea4a6a88ede59814c672a907dd24d0a683c2a7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 16:57:47 +0100
|
||||
Subject: [PATCH] Add missing initialization of virTypedParameters
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
For any API call where the API impl allocates the virTypedParameters
|
||||
array must be passed a NULL-initialized pointer.
|
||||
|
||||
Several APIs missed initialization which caused memory corruption.
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit 62edc0530fe04b4fc81473a5f5d750ae4d54ba3d)
|
||||
---
|
||||
lib/Sys/Virt.xs | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/lib/Sys/Virt.xs b/lib/Sys/Virt.xs
|
||||
index 40134d3..a013915 100644
|
||||
--- a/lib/Sys/Virt.xs
|
||||
+++ b/lib/Sys/Virt.xs
|
||||
@@ -2403,8 +2403,8 @@ get_node_sev_info(conn, flags=0)
|
||||
virConnectPtr conn;
|
||||
unsigned int flags;
|
||||
PREINIT:
|
||||
- virTypedParameterPtr params;
|
||||
- int nparams;
|
||||
+ virTypedParameterPtr params = NULL;
|
||||
+ int nparams = 0;
|
||||
CODE:
|
||||
if (virNodeGetSEVInfo(conn, ¶ms, &nparams, flags) < 0) {
|
||||
_croak_error();
|
||||
@@ -4554,8 +4554,8 @@ get_job_stats(dom, flags=0)
|
||||
unsigned int flags;
|
||||
PREINIT:
|
||||
int type;
|
||||
- virTypedParameterPtr params;
|
||||
- int nparams;
|
||||
+ virTypedParameterPtr params = NULL;
|
||||
+ int nparams = 0;
|
||||
HV *paramsHv;
|
||||
SV *typeSv;
|
||||
PPCODE:
|
||||
@@ -4986,8 +4986,8 @@ get_launch_security_info(dom, flags=0)
|
||||
virDomainPtr dom;
|
||||
unsigned int flags;
|
||||
PREINIT:
|
||||
- virTypedParameterPtr params;
|
||||
- int nparams;
|
||||
+ virTypedParameterPtr params = NULL;
|
||||
+ int nparams = 0;
|
||||
CODE:
|
||||
if (virDomainGetLaunchSecurityInfo(dom, ¶ms, &nparams, flags) < 0) {
|
||||
_croak_error();
|
||||
@@ -5103,8 +5103,8 @@ get_guest_vcpus(dom, flags=0)
|
||||
virDomainPtr dom;
|
||||
unsigned int flags;
|
||||
PREINIT:
|
||||
- virTypedParameterPtr params;
|
||||
- unsigned int nparams;
|
||||
+ virTypedParameterPtr params = NULL;
|
||||
+ unsigned int nparams = 0;
|
||||
CODE:
|
||||
if (virDomainGetGuestVcpus(dom, ¶ms, &nparams, flags) < 0) {
|
||||
_croak_error();
|
@ -1,122 +0,0 @@
|
||||
From 1b025f7c670eeafb835858558db356917e150a36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 16:59:37 +0100
|
||||
Subject: [PATCH] Add missing free'ing of virTypedParameters
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Safefree() must be used to free any virTypedParameter arrays previously
|
||||
allocated with Newx().
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit 440fde1cb81595c9f5eab7b03c240ca88e998961)
|
||||
---
|
||||
lib/Sys/Virt.xs | 36 +++++++++++++++++++++++++++---------
|
||||
1 file changed, 27 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/lib/Sys/Virt.xs b/lib/Sys/Virt.xs
|
||||
index a013915..3d8eb9b 100644
|
||||
--- a/lib/Sys/Virt.xs
|
||||
+++ b/lib/Sys/Virt.xs
|
||||
@@ -2683,8 +2683,10 @@ set_node_memory_parameters(conn, newparams, flags=0)
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
- if (virNodeSetMemoryParameters(conn, params, nparams, flags) < 0)
|
||||
+ if (virNodeSetMemoryParameters(conn, params, nparams, flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
Safefree(params);
|
||||
|
||||
|
||||
@@ -4566,7 +4568,7 @@ get_job_stats(dom, flags=0)
|
||||
|
||||
typeSv = newSViv(type);
|
||||
paramsHv = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ free(params);
|
||||
|
||||
EXTEND(SP, 2);
|
||||
PUSHs(newRV_noinc((SV*)typeSv));
|
||||
@@ -4775,11 +4777,15 @@ set_scheduler_parameters(dom, newparams, flags=0)
|
||||
}
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
if (flags) {
|
||||
- if (virDomainSetSchedulerParametersFlags(dom, params, nparams, flags) < 0)
|
||||
+ if (virDomainSetSchedulerParametersFlags(dom, params, nparams, flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
} else {
|
||||
- if (virDomainSetSchedulerParameters(dom, params, nparams) < 0)
|
||||
+ if (virDomainSetSchedulerParameters(dom, params, nparams) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
}
|
||||
Safefree(params);
|
||||
|
||||
@@ -4831,8 +4837,10 @@ set_memory_parameters(dom, newparams, flags=0)
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
- if (virDomainSetMemoryParameters(dom, params, nparams, flags) < 0)
|
||||
+ if (virDomainSetMemoryParameters(dom, params, nparams, flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
Safefree(params);
|
||||
|
||||
|
||||
@@ -4883,8 +4891,10 @@ set_numa_parameters(dom, newparams, flags=0)
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
- if (virDomainSetNumaParameters(dom, params, nparams, flags) < 0)
|
||||
+ if (virDomainSetNumaParameters(dom, params, nparams, flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
Safefree(params);
|
||||
|
||||
|
||||
@@ -4936,8 +4946,10 @@ set_blkio_parameters(dom, newparams, flags=0)
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
if (virDomainSetBlkioParameters(dom, params, nparams,
|
||||
- flags) < 0)
|
||||
+ flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
Safefree(params);
|
||||
|
||||
|
||||
@@ -5658,8 +5670,11 @@ set_block_iotune(dom, disk, newparams, flags=0)
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
- if (virDomainSetBlockIoTune(dom, disk, params, nparams, flags) < 0)
|
||||
+ if (virDomainSetBlockIoTune(dom, disk, params, nparams, flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
+ Safefree(params);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -5709,8 +5724,11 @@ set_interface_parameters(dom, intf, newparams, flags=0)
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
- if (virDomainSetInterfaceParameters(dom, intf, params, nparams, flags) < 0)
|
||||
+ if (virDomainSetInterfaceParameters(dom, intf, params, nparams, flags) < 0) {
|
||||
+ Safefree(params);
|
||||
_croak_error();
|
||||
+ }
|
||||
+ Safefree(params);
|
||||
|
||||
|
||||
HV *
|
@ -1,472 +0,0 @@
|
||||
From 88cf0236e1b98b00bcaa5762f9207b99fb98e084 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 17:11:57 +0100
|
||||
Subject: [PATCH] Clear typed parameter elements as well as array
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some typed parameter elements may contain strings that need to be
|
||||
freed.
|
||||
|
||||
We must ensure that the parameter array has dup'd the strings
|
||||
rather than borrowing a pointer.
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit 54f0d2c64021e6e143f40185f0181cf5d5a51f53)
|
||||
---
|
||||
lib/Sys/Virt.xs | 124 ++++++++++++++++++++++++++----------------------
|
||||
1 file changed, 66 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/lib/Sys/Virt.xs b/lib/Sys/Virt.xs
|
||||
index 3d8eb9b..6c2bf48 100644
|
||||
--- a/lib/Sys/Virt.xs
|
||||
+++ b/lib/Sys/Virt.xs
|
||||
@@ -86,7 +86,6 @@ virt_newSVull(unsigned long long val) {
|
||||
}
|
||||
|
||||
|
||||
-
|
||||
static void
|
||||
ignoreVirErrorFunc(void * userData, virErrorPtr error) {
|
||||
/* Do nothing */
|
||||
@@ -263,7 +262,8 @@ vir_typed_param_from_hv(HV *newparams, virTypedParameterPtr params, int nparams)
|
||||
|
||||
case VIR_TYPED_PARAM_STRING:
|
||||
ptr = SvPV(*val, len);
|
||||
- params[i].value.s = (char *)ptr;
|
||||
+ if (!(params[i].value.s = strdup((char *)ptr)))
|
||||
+ abort();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -300,7 +300,8 @@ vir_typed_param_add_string_list_from_hv(HV *newparams,
|
||||
localparams[*nparams + i].field[VIR_TYPED_PARAM_FIELD_LENGTH - 1] = '\0';
|
||||
|
||||
localparams[*nparams + i].type = VIR_TYPED_PARAM_STRING;
|
||||
- localparams[*nparams + i].value.s = ptr;
|
||||
+ if (!(localparams[*nparams + i].value.s = strdup(ptr)))
|
||||
+ abort();
|
||||
}
|
||||
|
||||
*params = localparams;
|
||||
@@ -308,6 +309,14 @@ vir_typed_param_add_string_list_from_hv(HV *newparams,
|
||||
}
|
||||
|
||||
|
||||
+static void
|
||||
+vir_typed_param_safe_free(virTypedParameterPtr params, int nparams)
|
||||
+{
|
||||
+ virTypedParamsClear(params, nparams);
|
||||
+ Safefree(params);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
_domain_event_lifecycle_callback(virConnectPtr con,
|
||||
virDomainPtr dom,
|
||||
@@ -2411,7 +2420,7 @@ get_node_sev_info(conn, flags=0)
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- free(params);
|
||||
+ virTypedParamsFree(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -2651,12 +2660,12 @@ get_node_memory_parameters(conn, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virNodeGetMemoryParameters(conn, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -2677,17 +2686,17 @@ set_node_memory_parameters(conn, newparams, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virNodeGetMemoryParameters(conn, params, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
if (virNodeSetMemoryParameters(conn, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
|
||||
@@ -4562,13 +4571,12 @@ get_job_stats(dom, flags=0)
|
||||
SV *typeSv;
|
||||
PPCODE:
|
||||
if (virDomainGetJobStats(dom, &type, ¶ms, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
typeSv = newSViv(type);
|
||||
paramsHv = vir_typed_param_to_hv(params, nparams);
|
||||
- free(params);
|
||||
+ virTypedParamsFree(params, nparams);
|
||||
|
||||
EXTEND(SP, 2);
|
||||
PUSHs(newRV_noinc((SV*)typeSv));
|
||||
@@ -4676,11 +4684,11 @@ block_copy(dom, path, destxml, newparams, flags=0)
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
if (virDomainBlockCopy(dom, path, destxml, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
void
|
||||
@@ -4741,17 +4749,17 @@ get_scheduler_parameters(dom, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
if (flags) {
|
||||
if (virDomainGetSchedulerParametersFlags(dom, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
} else {
|
||||
if (virDomainGetSchedulerParameters(dom, params, &nparams) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
}
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -4772,22 +4780,22 @@ set_scheduler_parameters(dom, newparams, flags=0)
|
||||
free(type);
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
if (virDomainGetSchedulerParameters(dom, params, &nparams) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
if (flags) {
|
||||
if (virDomainSetSchedulerParametersFlags(dom, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
} else {
|
||||
if (virDomainSetSchedulerParameters(dom, params, nparams) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -4805,12 +4813,12 @@ get_memory_parameters(dom, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainGetMemoryParameters(dom, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -4831,17 +4839,17 @@ set_memory_parameters(dom, newparams, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainGetMemoryParameters(dom, params, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
if (virDomainSetMemoryParameters(dom, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -4859,12 +4867,12 @@ get_numa_parameters(dom, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainGetNumaParameters(dom, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -4885,17 +4893,17 @@ set_numa_parameters(dom, newparams, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainGetNumaParameters(dom, params, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
|
||||
if (virDomainSetNumaParameters(dom, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -4913,12 +4921,12 @@ get_blkio_parameters(dom, flags=0)
|
||||
Newx(params, nparams, virBlkioParameter);
|
||||
|
||||
if (virDomainGetBlkioParameters(dom, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -4939,7 +4947,7 @@ set_blkio_parameters(dom, newparams, flags=0)
|
||||
Newx(params, nparams, virBlkioParameter);
|
||||
|
||||
if (virDomainGetBlkioParameters(dom, params, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
@@ -4947,10 +4955,10 @@ set_blkio_parameters(dom, newparams, flags=0)
|
||||
|
||||
if (virDomainSetBlkioParameters(dom, params, nparams,
|
||||
flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -4962,12 +4970,12 @@ get_perf_events(dom, flags=0)
|
||||
int nparams = 0;
|
||||
CODE:
|
||||
if (virDomainGetPerfEvents(dom, ¶ms, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -4982,7 +4990,7 @@ set_perf_events(dom, newparams, flags=0)
|
||||
int nparams = 0;
|
||||
PPCODE:
|
||||
if (virDomainGetPerfEvents(dom, ¶ms, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
@@ -4990,7 +4998,7 @@ set_perf_events(dom, newparams, flags=0)
|
||||
|
||||
if (virDomainSetPerfEvents(dom, params, nparams, flags) < 0)
|
||||
_croak_error();
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -5005,7 +5013,7 @@ get_launch_security_info(dom, flags=0)
|
||||
_croak_error();
|
||||
}
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- free(params);
|
||||
+ virTypedParamsFree(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -5386,10 +5394,10 @@ _migrate(dom, destcon, newparams, flags=0)
|
||||
* if it is possible todo so
|
||||
*/
|
||||
if ((RETVAL = virDomainMigrate3(dom, destcon, params, nparams, flags)) == NULL) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -5477,10 +5485,10 @@ _migrate_to_uri(dom, desturi, newparams, flags=0)
|
||||
* if it is possible todo so
|
||||
*/
|
||||
if (virDomainMigrateToURI3(dom, desturi, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
void
|
||||
@@ -5639,12 +5647,12 @@ get_block_iotune(dom, disk, flags=0)
|
||||
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
if (virDomainGetBlockIoTune(dom, disk, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -5665,16 +5673,16 @@ set_block_iotune(dom, disk, newparams, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainGetBlockIoTune(dom, disk, params, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
if (virDomainSetBlockIoTune(dom, disk, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -5693,12 +5701,12 @@ get_interface_parameters(dom, intf, flags=0)
|
||||
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
if (virDomainGetInterfaceParameters(dom, intf, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
RETVAL = vir_typed_param_to_hv(params, nparams);
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
@@ -5719,16 +5727,16 @@ set_interface_parameters(dom, intf, newparams, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainGetInterfaceParameters(dom, intf, params, &nparams, 0) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
nparams = vir_typed_param_from_hv(newparams, params, nparams);
|
||||
if (virDomainSetInterfaceParameters(dom, intf, params, nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
HV *
|
||||
@@ -5764,7 +5772,7 @@ block_stats(dom, path, flags=0)
|
||||
Newx(params, nparams, virTypedParameter);
|
||||
|
||||
if (virDomainBlockStatsFlags(dom, path, params, &nparams, flags) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
@@ -5784,7 +5792,7 @@ block_stats(dom, path, flags=0)
|
||||
(void)hv_store(RETVAL, field, strlen(field), val, 0);
|
||||
}
|
||||
}
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
}
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
@@ -6018,7 +6026,7 @@ get_cpu_stats(dom, start_cpu, ncpus, flags=0)
|
||||
|
||||
Newx(params, ncpus * nparams, virTypedParameter);
|
||||
if ((ret = virDomainGetCPUStats(dom, params, nparams, start_cpu, ncpus, flags)) < 0) {
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
_croak_error();
|
||||
}
|
||||
|
||||
@@ -6028,7 +6036,7 @@ get_cpu_stats(dom, start_cpu, ncpus, flags=0)
|
||||
PUSHs(newRV_noinc((SV *)rec));
|
||||
}
|
||||
|
||||
- Safefree(params);
|
||||
+ vir_typed_param_safe_free(params, nparams);
|
||||
|
||||
|
||||
void
|
@ -1,28 +1,24 @@
|
||||
# Automatically generated by perl-Sys-Virt.spec.PL
|
||||
|
||||
Name: perl-Sys-Virt
|
||||
Version: 4.5.0
|
||||
Release: 5%{?dist}
|
||||
Version: 6.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Represent and manage a libvirt hypervisor connection
|
||||
License: GPLv2+ or Artistic
|
||||
URL: https://metacpan.org/release/Sys-Virt
|
||||
Source0: https://cpan.metacpan.org/authors/id/D/DA/DANBERR/Sys-Virt-v%{version}.tar.gz
|
||||
Patch0: 0000-Add-NWFilterBinding.pm-module-missed-in-dist.patch
|
||||
Patch1: 0001-Add-missing-import-of-NWFilterBinding.patch
|
||||
Patch2: 0002-Add-missing-initialization-of-virTypedParameters.patch
|
||||
Patch3: 0003-Add-missing-free-ing-of-virTypedParameters.patch
|
||||
Patch4: 0004-Clear-typed-parameter-elements-as-well-as-array.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
# Build
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: gcc
|
||||
BuildRequires: git
|
||||
BuildRequires: libvirt-devel >= %{version}
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl-devel
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl-generators
|
||||
%endif
|
||||
BuildRequires: perl(ExtUtils::CBuilder)
|
||||
BuildRequires: perl(Module::Build)
|
||||
BuildRequires: sed
|
||||
@ -42,6 +38,7 @@ BuildRequires: perl(XML::XPath::XMLParser)
|
||||
BuildRequires: perl(Test::CPAN::Changes)
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
||||
BuildRequires: git
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
|
||||
|
||||
%description
|
||||
@ -73,6 +70,10 @@ virtualization containers to be managed with a consistent API.
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Mon Apr 27 2020 Danilo C. L. de Paula <ddepaula@redhat.com> - 6.0.0
|
||||
- Resolves: bz#1810193
|
||||
(Upgrade components in virt:rhel module:stream for RHEL-8.3 release)
|
||||
|
||||
* Fri Jun 28 2019 Danilo de Paula <ddepaula@redhat.com> - 4.5.0-5
|
||||
- Rebuild all virt packages to fix RHEL's upgrade path
|
||||
- Resolves: rhbz#1695587
|
||||
|
Loading…
Reference in New Issue
Block a user