Commit Graph

1085 Commits

Author SHA1 Message Date
Andrea Bolognani
e9d4dc9512 systemd: Rename @mode@ -> @sockmode@
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-09-26 16:57:50 +02:00
Andrea Bolognani
4499eea524 systemd: Add missing Also for admin socket
When libvirtd, virtlog and virtlockd are enabled, we want their
admin sockets to be enabled for socket activation as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-09-26 16:55:28 +02:00
K Shiva Kiran
faaa9c0065 remote: Implement client side of network netadata change event
Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-09-18 11:24:50 +02:00
K Shiva Kiran
95ee416a75 Define Network Metadata change event
When changing the metadata via virNetworkSetMetadata(), we can
now emit an event to notify the app of changes. This is useful
when co-ordinating different applications read/write of custom
metadata.

Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-09-18 11:24:47 +02:00
Michal Privoznik
6c67e66c83 remote: Move error messages onto a single line
Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2023-09-04 09:35:36 +02:00
K Shiva Kiran
7ab9d1ec88 Implementing Remote Protocol for Network Metadata
- Defines wire protocol format.
- Implements remote driver.

Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-08-25 12:36:37 +02:00
Daniel P. Berrangé
3d2f3fb72b src: fix max file limits in systemd services
This fixes

  commit 38abf9c34d
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Wed Jun 21 13:22:40 2023 +0100

    src: set max open file limit to match systemd >= 240 defaults

The bug referenced in that commit had suggested to set

  LimitNOFile=512000:1024

on the basis that matches current systemd default behaviour and is
compatible with old systemd. That was good except

 * The setting is LimitNOFILE and these are case sensitive
 * The hard and soft limits were inverted - soft must come
   first and so it would have been ignored even if the
   setting name was correct.
 * The default hard limit is 524288 not 512000

Reported-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-08-04 13:00:52 +01:00
Peter Krempa
3a45a4d78c daemon: Treat logging of VIR_ERR_MULTIPLE_INTERFACES same as VIR_ERR_NO_INTERFACE
When a query for an interface via virInterfaceLookupByMACString finds
multiple interfaces an error is returned. Treat such error with the same
'debug' priority as we treat when the interface was not found to avoid
spamming logs with such configurations.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/514
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-08-04 10:04:21 +02:00
Michal Privoznik
1ca3c339a1 lib: Prefer sizeof(variable) instead of sizeof(type) in memset
If one of previous commits taught us something, it's that:
sizeof(variable) and sizeof(type) are not the same. Especially
because for live enough code the type might change (e.g. as we
use autoptr more). And since we don't get any warnings when an
incorrect length is passed to memset() it is easy to mess up. But
with sizeof(variable) instead, it's not as easy. Therefore,
switch to using memset(variable, 0, sizeof(*variable)), or its
alternatives, depending on level of pointers.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
2023-08-03 16:41:19 +02:00
Michal Privoznik
b20a5e9a4d lib: use struct zero initializer instead of memset
This is a more concise approach and guarantees there is
no time window where the struct is uninitialized.

Generated using the following semantic patch:

  @@
  type T;
  identifier X;
  @@
  -  T X;
  +  T X = { 0 };
     ... when exists
  (
  -  memset(&X, 0, sizeof(X));
  |
  -  memset(&X, 0, sizeof(T));
  )

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
2023-08-03 16:41:19 +02:00
Michal Privoznik
258fc73cf0 remote_driver: Drop explicit memset(&sargs) in remoteAuthSASL()
Inside of remoteAuthSASL() the sargs variable is already
initialized to zero during declaration. There's no need to
memset() it again as it's unused in between it's declaration and
said memset().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
2023-08-03 16:35:42 +02:00
Michal Privoznik
039b16e41e Decrease scope of some variables
There are couple of variables that are declared at function
beginning but then used solely within a block (either for() loop
or if() statement). And just before their use they are zeroed
explicitly using memset(). Decrease their scope, use struct zero
initializer and drop explicit memset().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
2023-08-03 16:35:11 +02:00
Oleg Vasilev
ea4c67f567 remote: handle partial data transmission
A new bug was introduced as a part of use-after-free fix below:

    commit 411cbe7199
    Author: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
    Date:   Tue Jul 4 13:10:22 2023 +0600

        remote: fix stream use-after-free

When the message was processed partially, it is actually supposed to
stay in the queue to be processed again. In such case, reinsert it back.

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-07-26 10:27:13 +02:00
Oleg Vasilev
411cbe7199 remote: fix stream use-after-free
Inside daemonStreamHandleWrite on stream completion (status=OK) we
reuse msg object to send confirmation.

Only after that, msg is poped from the queue and checked for continue.
By that time, msg might've already been processed for the confirmation
and freed.

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-07-24 14:32:08 +02:00
Oleg Vasilev
54e59e9135 net: add debug logs
Helped to debug next patch use-after-free.

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-07-24 14:32:02 +02:00
Daniel P. Berrangé
6103584284 src: remove dep on systemd-logind.service from unit files
After the previous commit we no longer require that logind is actually
running, it merely has to be activatable.

https://gitlab.com/libvirt/libvirt/-/issues/489
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-07-20 11:01:04 +01:00
Daniel P. Berrangé
38abf9c34d src: set max open file limit to match systemd >= 240 defaults
Since systemd 240, all services get an open file hard limit of
500k, and a soft limit of 1024. This limit means apps are safe
to use select() by default which is limited to 1024 FDs. Apps
which don't use select() are expected to simply set their soft
limit to match the hard limit during startup.

With our current unit file settings we've been effectively
reducing the max open files we have on most modern systems.

https://gitlab.com/libvirt/libvirt/-/issues/489
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-07-20 10:58:01 +01:00
Daniel P. Berrangé
427eef8959 src: remove deps on ip[6]tables/firewalld.service from systemd units
The unit files both have After=network.target, and this in turn implies
After=network-pre.target. Both iptables.service & ip6tables.service have
Before=network-pre.target since Fedora >= 35 and RHEL >= 8.4.

When we first added the deps on ip[6]tables.service in

  commit 0756415f14
  Author: Laine Stump <laine@redhat.com>
  Date:   Fri May 1 00:05:50 2020 -0400

    systemd: start libvirtd after firewalld/iptables services

the Before=network-pre.target didn't exist, but we can rely on it now
given our supported platforms matrix.

The firewalld.service has similarly has a Before=network-pre.target,
even when we took that commit above, so this dep was in face never
actually needed. This answers the question posed in that above commit
message about firewalld ordering.

https://gitlab.com/libvirt/libvirt/-/issues/489
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-07-20 10:58:00 +01:00
Daniel P. Berrangé
a315070047 src: remove After=local-fs.target from systemd units
All services are ordered after local-fs.target unless they have set
DefaultDependencies=no, which we do not do.

https://gitlab.com/libvirt/libvirt/-/issues/489
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-07-20 10:58:00 +01:00
Andrea Bolognani
32f772e986 meson: Use initconfdir
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-05-05 15:08:25 +02:00
Peter Krempa
50be70ded3 Use 'virTypedParamListFetch' for extracting identity parameters list
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-05-02 14:32:46 +02:00
Jiri Denemark
732ff069ad remote: Update format strings in translated messages
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-04-01 11:40:34 +02:00
Daniel P. Berrangé
b07a1f40c7 remote: fix typo in error message string
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-03-13 12:22:03 +00:00
Ján Tomko
d3d16f829b util: virPidFileAcquirePath: remove waitForLock argument
None of the callers need it anymore.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-03-08 12:16:56 +01:00
Mike Pontillo
6386dd897d remote: add mutex when freeing private callbacks
This commit resolves illegal memory accesses observed via:

  remoteClientFreePrivateCallbacks()
  remoteClientCloseFunc()
  virNetServerClientCloseLocked()
  virNetServerProcessClients()
  daemonServerProcessClients()
  virHashForEach()
  virNetDaemonRun()
  main()

Signed-off-by: Mike Pontillo <mpontillo@digitalocean.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-03-07 23:51:11 +01:00
Peter Krempa
1f1bd6ab2d remote_protocol: Fix list of supported ACL object names
Add missing and fix spelling of existing ones.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-03-06 13:09:15 +01:00
Peter Krempa
b3f8e072fe rpc: Don't warn about "max_client_requests" in single-threaded daemons
The warning about max_client_requests is hit inside virtlogd every time
a VM starts which spams the logs.

Emit the warning only when the client request limit is not 1 and add a
warning into the daemon config to not configure it too low instead.

Fixes: 031878c236
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2145188
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-02-15 12:36:17 +01:00
Michal Privoznik
e4cf477701 remote_driver: Work around broken clang
In recent commit of v9.0.0-191-gc71c159248 I've introduced
remoteConnectFormatURI() function and in the function @query
variable. Even though, the variable is used, clang-13 fails to
see it. Surprisingly, newer clang is not affected. Fortunately,
swapping the order in which variables are set makes clang happy
again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-09 10:12:00 +01:00
Michal Privoznik
d133d73f54 remote: Pass 'mode' and 'socket' URI parameters to virt-ssh-helper
When handling virConnectOpen(), we parse given URI, specifically
all those parameters we know, like ?mode, ?socket, ?name, etc.
ignoring those we don't recognize yet. Then, we reconstruct the
URI back, but ignoring all parameters we've parsed. In other
words:

  qemu:///system?mode=legacy&foo=bar

becomes:

  qemu:///system?foo=bar

The reconstructed URI is then passed to the corresponding driver
(QEMU in our example) with intent of it parsing parameters
further (or just ignoring them). But for some transport modes,
where virt-ssh-helper is ran on the remote host (libssh, libssh2,
ssh) we need to pass ?mode and ?socket parameters, so that it can
do the right thing, e.g. for 'mode=legacy' start the monolithic
daemon, or for 'socket=' connect to the given socket.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/433
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-08 16:50:45 +01:00
Michal Privoznik
c71c159248 remote_driver: Move URI re-generation into a function
There's a piece of code in doRemoteOpen() that is going to be
called twice. Instead of duplicating the code, move it into a
function that will be called twice, later on.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-08 16:50:45 +01:00
Michal Privoznik
77b4a67cf6 virt-ssh-helper: Accept ?socket= in connection URI
Similarly to the previous commit, let's accept "socket" parameter
in the connection URI. This change will allow us to use
virt-ssh-helper instead of 'nc' in all cases (done in one of
future commits).

Please note, when the parameter is used it effectively disables
automatic daemon spawning and an error is reported. But this is
intentional - so that the helper behaves just like regular
virConnectOpen() with different transport than ssh, e.g. unix.

But this 'change' is acceptable - there's no way for users to
make our remote code pass the argument to virt-ssh-helper, yet.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-08 16:50:45 +01:00
Michal Privoznik
8275a06182 virt-ssh-helper: Accept ?mode= in connection URI
When split daemons were introduced, we also made connection URI
accept new parameter: mode={auto,legacy,direct} so that a client
can force connecting to either old, monolithic daemon, or to
split daemon (see v5.7.0-rc1~257 for more info).

Now, the change was done to the remote driver, but not to
virt-ssh-helper. True, our remote driver code still does not pass
the 'mode' parameter, but that will be addressed in next commits.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-08 16:50:45 +01:00
Michal Privoznik
16d0425fbe doRemoteOpen(): Rename 'failed' label to 'error'
Our own coding style suggest not inventing new names for labels
and stick with 'cleanup' (when the path is used in both,
successful and unsuccessful returns), or 'error' (when the code
below the label is used only upon error). Well, 'failed' label
falls into the latter category. Rename it then.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-08 16:50:45 +01:00
Michal Privoznik
77d417d9ef Drop checks for virURIFormat() retval
The virURIFormat() function either returns a string, or aborts
(on OOM). There's no way this function can return NULL (as of
v7.2.0-rc1~277). Therefore, it doesn't make sense to check its
retval against NULL.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-02-08 16:50:45 +01:00
Jiri Denemark
648391f170 remote: Fix memory leak in remoteDomainMigrateFinish3*
Theoretically, when remoteDomainMigrateFinish3* is called without a
pointer for storing migration cookie or its length (i.e., either
cookieout == NULL or cookieoutlen == NULL), we would leak the freshly
created virDomain object referenced by rv.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2023-01-30 16:02:41 +01:00
Jiri Denemark
9f8fba7501 remote: Fix version annotation for remoteDomainFDAssociate
The API was added in libvirt 9.0.0.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2023-01-27 11:51:16 +01:00
Jiri Denemark
1cf7e6ec05 remote: Drop useless cleanup in remoteDispatchNodeGet{CPU,Memory}Stats
The function cannot fail once it starts populating
ret->params.params_val[i].field.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-01-26 16:11:09 +01:00
Jiri Denemark
d0f339170f remote: Avoid leaking uri_out
In case the API returned success and a NULL pointer in uri_out, we would
leak the preallocated buffer used for storing the uri_out pointer.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-01-26 16:11:09 +01:00
Jiri Denemark
4849eb2220 remote: Propagate error from virDomainGetSecurityLabelList via RPC
The daemon side of this API has been broken ever since the API was
introduced in 2012. Instead of sending the error from
virDomainGetSecurityLabelList via RPC so that the client can see it, the
dispatcher would just send a successful reply with return value set to
-1 (and an empty array of labels). The client side would propagate this
return value so the client can see the API failed, but the original
error would be lost.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-01-26 16:10:33 +01:00
Michal Privoznik
0211e430a8 remote: Initialize args variable
Recently, in v9.0.0-7-gb2034bb04c we've dropped initialization of
@args variable. The reasoning was that eventually, all members of
the variable will be set. Well, this is not correct. For
instance, in remoteConnectGetAllDomainStats() the
args.doms.doms_val pointer is set iff @ndoms != 0. However,
regardless of that, the pointer is then passed to VIR_FREE().

Worse, the whole args is passed to
xdr_remote_connect_get_all_domain_stats_args() which then calls
xdr_array, which tests the (uninitialized) pointer against NULL.

This effectively reverts b2034bb04c.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-01-26 15:05:50 +01:00
Jim Fehlig
cba964b145 services: Weaken systemd dependency on virtlockd
The systemd service files of the qemu and libxl driver currently have a
'Requires' dependency on virtlockd, which is too strong since virtlockd
is not enabled by default in either driver. Change the dependency to a
'Wants' to avoid a package dependency between the driver subpackages and
the new libvirt-daemon-lock subpackage.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-18 11:06:13 -07:00
Daniel P. Berrangé
d6c7c6823a remote: add missing lock guard for secret value API
This fixes a bug in

  commit fda53ab3a5
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Thu Dec 22 10:29:32 2022 -0500

    remote: use VIR_LOCK_GUARD in client code

Reviewed-by: Erik Skultety <eskultet@redhat>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-18 13:22:38 +00:00
Erik Skultety
9de1eb61a6 remote: remoteDomainCreate: Add missing struct initializer for 'ret2'
Fixes: 62448c1a49

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-18 13:39:24 +01:00
Daniel P. Berrangé
62448c1a49 remote: use struct zero initializer instead of memset
This is a more concise approach and guarantees there is
no time window where the struct is uninitialized.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-17 12:33:54 -05:00
Daniel P. Berrangé
fda53ab3a5 remote: use VIR_LOCK_GUARD in client code
Using VIR_LOCK_GUARD enables the 'done' goto label to be
eliminated.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-17 12:33:54 -05:00
Daniel P. Berrangé
b2034bb04c remote: remove redundant initialization of args variable
Every member of the args variable will be initialized
explicitly. A few methods had a redundant call to memset
the args which can be removed.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-17 12:33:54 -05:00
Peter Krempa
d7e9093502 qemu: Fix handling of passed FDs in remoteDispatchDomainFdAssociate
To ensure same behaviour when remote driver is or is not used we must
not steal the FDs and array holding them passed to qemuDomainFDAssociate
but rather duplicate them. At the same time the remote driver must close
and free them to prevent leak.

Pointed out by Coverity as FD leak on error path:

 *** CID 404348:  Resource leaks  (RESOURCE_LEAK)
 /src/remote/remote_daemon_dispatch.c: 7484 in remoteDispatchDomainFdAssociate()
 7478         rv = 0;
 7479
 7480      cleanup:
 7481         if (rv < 0)
 7482             virNetMessageSaveError(rerr);
 7483         virObjectUnref(dom);
 >>>     CID 404348:  Resource leaks  (RESOURCE_LEAK)
 >>>     Variable "fds" going out of scope leaks the storage it points to.
 7484         return rv;

Fixes: abd9025c2f
Fixes: f762f87534
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-01-10 15:54:52 +01:00
Daniel P. Berrangé
2b5f925112 remote: fix double free of migration params on error
The remote_*_args methods will generally borrow pointers
passed in the caller, so should not be freed.

On failure of the virTypedParamsSerialize method, however,
xdr_free was being called. This is presumably because it
was thought that the params may have been partially
serialized and need cleaning up. This is incorrect, as
virTypedParamsSerialize takes care to cleanup partially
serialized data. This xdr_free call would lead to free'ing
the borrowed cookie pointers, which would be a double free.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-10 08:26:27 -05:00
Peter Krempa
abd9025c2f lib: Introduce virDomainFDAssociate API
The API can be used to associate one or more (e.g. a RO and RW fd for a
disk backend image) FDs to a VM. They can be then used per definition.

The primary use case for now is for complex deployment where
libvirtd/virtqemud may be run inside a container and getting the image
into the container is complicated.

In the future it will also allow passing e.g. vhost FDs and other
resources to a VM without the need to have a filesystem representation
for it.

Passing raw FDs has few intricacies and thus libvirt will by default not
restore security labels.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2023-01-09 14:59:42 +01:00
Jiang Jiacheng
ef36cc5058 remote: use g_autofree and remove unnecessary label
Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2023-01-09 04:38:52 +01:00