- 20 8月, 2015 1 次提交
-
-
由 Guido Günther 提交于
This makes it consistent with the other FLAGS in this file and reduced clutter in the diff when adding new entries.
-
- 10 8月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Since its introduction in 2011 (particularly in commit f4324e32), the option doesn't work. It just effectively disables all incoming connections. That's because the client private data that contain the 'keepalive_supported' boolean, are initialized to zeroes so the bool is false and the only other place where the bool is used is when checking whether the client supports keepalive. Thus, according to the server, no client supports keepalive. Removing this instead of fixing it is better because a) apparently nobody ever tried it since 2011 (4 years without one month) and b) we cannot know whether the client supports keepalive until we get a ping or pong keepalive packet. And that won't happen until after we dispatched the ConnectOpen call. Another two reasons would be c) the keepalive_required was tracked on the server level, but keepalive_supported was in private data of the client as well as the check that was made in the remote layer, thus making all other instances of virNetServer miss this feature unless they all implemented it for themselves and d) we can always add it back in case there is a request and a use-case for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 27 7月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
First hunk changes the use of srcdir to top_srcdir so it complies with other rules in the Makefile. Second one removes the need of remote_protocol.h in admin_protocol.h as it was suggested and worked in, but this one line was missed apparently. Last one just removes the 'remote' naming from admin protocol specification, just so it's cleaner. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 7月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
s/priviledged/privileged/ Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 6月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Don't listen on the admin socket in the daemon and comment out the admin devel files out of specfile. Library is still being compiled and installed in order to link easily without any disturbing modifications to the daemon code. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 6月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
When setting up the daemon networking, new services are created. These services then have sockets to listen on. Once created, the service objects are added to corresponding server object. However, during that process, server increases reference counter of the service object. So, at the end of the function, we should decrease it again. This way the service objects will have only 1 reference, but that's okay since servers are the only objects having a reference. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 6月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
If the admin service is disabled it would not be allocated, but the NULL pointer still would be added to the admin server. Since virNetServerAddService would dereference it, the daemon would crash. Move the service registration into the block that allocates it.
-
由 Michal Privoznik 提交于
So, it's a little paradox that we use the file twice. Firstly to build libvirt-admin.la (a client side of the Admin API), then once again to build the server side. Well, the problem is, this does not play nicely with the distclean since the file is generated. So while it's removed in the src/ the distclean running in daemon/ will not find the file and fail. The file is needed because it contains the RPC wrappers. So let's leave the client code as is and from the daemon/ just link the client library. The linker will find desired symbols and use them. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 6月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
The Admin API consists of a few files on daemon side. Notably daemon/admin_server.{ch}. While they are both on the repo, only the .c file is mentioned in Makefile. Therefore, .h is not distributed and 'make rpm' fails. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In latest patches we added Admin API. However, the Makefile in daemon was missing one dependency: admin_server.c is including generated file admin_dispatch.h. However, this dependency was not explicitly marked in the Makefile therefore the build happened to fail on some occasions. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 6月, 2015 5 次提交
-
-
由 Martin Kletzander 提交于
This reverts commit 5792fabb. I mistakenly pushed it along with the Admin API series.
-
由 Martin Kletzander 提交于
Just one of the simplest functions that returns string "Clients: X" where X is the number of connected clients to daemon's first subserver (the original one), so it can be tested using virsh, ipython, etc. The subserver is gathered by incrementing its reference counter (similarly to getting qemu capabilities), so there is no deadlock with admin subserver in this API. Here you can see how functions should be named in the client (virAdm*) and server (adm*). There is also a parameter @flags that must be 0, which helps testing proper error propagation into the client. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
For this to pe properly separated from other protocols used by the server, there is second server added which allows access to the whole virNetDaemon to its clients. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This is not going to be very widely used, but for some corner cases and easier (unsafe) debugging, it might be nice. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This allows to have more servers in one daemon which helps isolating some resources. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 6月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
By default, getaddrinfo() will return addresses for both IPv4 and IPv6 if both protocols are enabled, and so the RPC code will listen/connect to both protocols too. There may be cases where it is desirable to restrict this to just one of the two protocols, so add an 'int family' parameter to all the TCP related APIs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 6月, 2015 1 次提交
-
-
由 Eric Blake 提交于
Commit 1882c0bd accidentally used ',' instead of ';'; oddly enough, the result was still syntactically valid (yes, C is a fun language). But it made me do a double take; it's better to use idiomatic syntax. * daemon/remote.c (remoteRelayDomainEventDeviceAdded): Fix harmless typo. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 5月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
Similarly to other error codes that notify the user that the object does not exist lower the priority of VIR_ERR_NO_DOMAIN_METADATA to VIR_LOG_DEBUG when writing the log entry.
-
- 11 5月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
Extend it to a universal helper used for clearing lists of any objects. Note that the argument type is specifically void * to allow implicit typecasting. Additionally add a helper that works on non-NULL terminated arrays once we know the length.
-
- 05 5月, 2015 2 次提交
-
-
由 Jim Fehlig 提交于
Add logrotate config for log files in /var/log/libvirt/libxl.
-
由 Cole Robinson 提交于
Many users, who admin their own machines, want to be able to access system libvirtd via tools like virt-manager without having to enter a root password. Just google 'virt-manager without password' and you'll find many hits. I've read at least 5 blog posts over the years describing slightly different ways of achieving this goal. Let's finally add official support for this. Install a polkit-1 rules file granting password-less auth for any user in the new 'libvirt' group. Create the group on RPM install https://bugzilla.redhat.com/show_bug.cgi?id=957300
-
- 27 4月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
In a lot places we use path like this: $(srcdir)/../src/.... when in fact it can be: $(top_srcdir)/src/ Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 4月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
Apparently, files in /usr/lib/sysctl.d are usually prefixed with numbers for easier ordering. Let's be consistent with this. I chose 60 for libvirtd so that it goes after 50-default.conf. https://bugzilla.redhat.com/show_bug.cgi?id=1084876Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 15 4月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
The counterpart to VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED. https://bugzilla.redhat.com/show_bug.cgi?id=1206114
-
- 02 4月, 2015 2 次提交
-
-
由 Ján Tomko 提交于
In the order of appearance: * MAX_LISTEN - never used added by 23ad665c (qemud) and addec57 (lock daemon) * NEXT_FREE_CLASS_ID - never used, added by 07d1b6b5 * virLockError - never used, added by eb8268a4 * OPENVZ_MAX_ARG, CMDBUF_LEN, CMDOP_LEN unused since the removal of ADD_ARG_LIT in d8b31306 * QEMU_NB_PER_CPU_STAT_PARAM - unused since 897808e7 * QEMU_CMD_PROMPT, QEMU_PASSWD_PROMPT - unused since 1dc10a7b * TEST_MODEL_WORDSIZE - unused since c25c18f7 * TEMPDIR - never used, added by 714bef5b * NSIG - workaround around old headers added by commit 60ed1d2a unused since virExec was moved by commit 02e86910 * DO_TEST_PARSE - never used, added by 9afa0060 * DIFF_MSEC, GETTIMEOFDAY - unused since eee6eb66
- 26 3月, 2015 2 次提交
- 25 3月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
The fake object is used to pass the domain name and UUID to the ACL code for events where we don't have the full domain def when dispatching events. The rest of the entries would be left uninitialized. While this is not a problem code-wise as the used fields are initialized it looks ugly in the debugger.
-
由 Jiri Denemark 提交于
Since all APIs are also RPC calls, we automatically get all APIs covered with thread jobs. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 3月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Not all NICs (esp. the virtual ones like TUN) must have a hardware address. Teach our RPC that it's possible. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 3月, 2015 2 次提交
-
-
由 Nehal J Wani 提交于
daemon/remote.c * Define remoteSerializeDomainInterface, remoteDispatchDomainInterfaceAddresses src/remote/remote_driver.c * Define remoteDomainInterfaceAddresses src/remote/remote_protocol.x * New RPC procedure: REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES * Define structs remote_domain_ip_addr, remote_domain_interface, remote_domain_interfaces_addresse_args, remote_domain_interface_addresses_ret * Introduce upper bounds (to handle DoS attacks): REMOTE_DOMAIN_INTERFACE_MAX = 2048 REMOTE_DOMAIN_IP_ADDR_MAX = 2048 Restrictions on the maximum number of aliases per interface were removed after kernel v2.0, and theoretically, at present, there are no upper limits on number of interfaces per virtual machine and on the number of IP addresses per interface. src/remote_protocol-structs * New structs added Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
-
由 Eric Blake 提交于
Commit 4f25146b (v1.2.8) managed to silence Coverity, but at the cost of a memory leak detected by valgrind: ==24129== 40 bytes in 5 blocks are definitely lost in loss record 355 of 637 ==24129== at 0x4A08B1C: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==24129== by 0x5084B8E: virReallocN (viralloc.c:245) ==24129== by 0x514D5AA: virDomainObjListExport (domain_conf.c:22200) ==24129== by 0x201227DB: qemuConnectListAllDomains (qemu_driver.c:18042) ==24129== by 0x51CC1B6: virConnectListAllDomains (libvirt-domain.c:6797) ==24129== by 0x14173D: remoteDispatchConnectListAllDomains (remote.c:1580) ==24129== by 0x121BE1: remoteDispatchConnectListAllDomainsHelper (remote_dispatch.h:1072) In short, every time a client calls a ListAll variant and asks for the resulting list, but there are 0 elements to return, we end up leaking the 1-entry array that holds the NULL terminator. What's worse, a read-only client can access these functions in a tight loop to cause libvirtd to eventually run out of memory; and this can be considered a denial of service attack against more privileged clients. Thankfully, the leak is so small (8 bytes per call) that you would already have some other denial of service with any guest calling the API that frequently, so an out-of-memory crash is unlikely enough that this did not warrant a CVE. * daemon/remote.c (remoteDispatchConnectListAllDomains) (remoteDispatchDomainListAllSnapshots) (remoteDispatchDomainSnapshotListAllChildren) (remoteDispatchConnectListAllStoragePools) (remoteDispatchStoragePoolListAllVolumes) (remoteDispatchConnectListAllNetworks) (remoteDispatchConnectListAllInterfaces) (remoteDispatchConnectListAllNodeDevices) (remoteDispatchConnectListAllNWFilters) (remoteDispatchConnectListAllSecrets) (remoteDispatchNetworkGetDHCPLeases): Plug leak. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 06 3月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Implement the remote plumbing for virDomainGetIOThreadsInfo Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 19 2月, 2015 1 次提交
-
-
由 Pavel Hrdina 提交于
Libvirt could crash with segfault if user issue "service reload" right after "service start". One possible way to crash libvirt is to run reload during initialization of QEMU driver. It could happen when qemu driver will initialize qemu_driver_lock but don't have a time to set it's "config" and the SIGHUP arrives. The reload handler tries to get qemu_drv->config during "virStorageAutostart" and dereference it which ends with segfault. Let's ignore all reload requests until all drivers are initialized. In addition set driversInitialized before we enter virStateCleanup to ignore reload request while we are shutting down. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1179981Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 13 2月, 2015 1 次提交
-
-
由 Zhang Bo 提交于
not yet not -> not yet. Signed-off-by: NZhang Bo <oscar.zhangbo@huawei.com>
-
- 27 1月, 2015 2 次提交
-
-
由 Ján Tomko 提交于
libvirtd.c: In function 'daemonSetupAccessManager': libvirtd.c:730:18: error: declaration of 'driver' shadows a global declaration [-Werror=shadow] const char **driver = (const char **)config->access_drivers; ^ In file included from libvirtd.c:95:0: ../src/node_device/node_device_driver.h:43:36: error: shadowed declaration is here [-Werror=shadow] extern virNodeDeviceDriverStatePtr driver; ^
-
由 Daniel P. Berrange 提交于
For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the secondary driver that is associated with the hypervisor in question. As a result the ESX & HyperV drivers have both been forced to do hacks where they register no-op drivers for the ones they don't implement. For stateful, server side drivers, we always just want to use the same built-in shared driver. The exception is virtualbox which is really a stateless driver and so wants to use its own server side secondary drivers. To deal with this virtualbox has to be built as 3 separate loadable modules to allow registration to work in the right order. This can all be simplified by introducing a new struct recording the precise set of secondary drivers each hypervisor driver wants struct _virConnectDriver { virHypervisorDriverPtr hypervisorDriver; virInterfaceDriverPtr interfaceDriver; virNetworkDriverPtr networkDriver; virNodeDeviceDriverPtr nodeDeviceDriver; virNWFilterDriverPtr nwfilterDriver; virSecretDriverPtr secretDriver; virStorageDriverPtr storageDriver; }; Instead of registering the hypervisor driver, we now just register a virConnectDriver instead. This allows us to remove all probing of secondary drivers. Once we have chosen the primary driver, we immediately know the correct secondary drivers to use. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 12月, 2014 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1160995 In our config files users are expected to pass several integer values for different configuration knobs. However, majority of them expect a nonnegative number and only a few of them accept a negative number too (notably keepalive_interval in libvirtd.conf). Therefore, a new type to config value is introduced: VIR_CONF_ULONG that is set whenever an integer is positive or zero. With this approach knobs accepting VIR_CONF_LONG should accept VIR_CONF_ULONG too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There's no need to implement ToString() function like we do if we can use our shiny macros. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-