- 09 5月, 2013 27 次提交
-
-
由 Daniel P. Berrange 提交于
The XenStore driver is mandatory, so it can be used unconditonally for the xenUnifiedConnectListDomains & xenUnifiedConnectNumOfDomains drivers. Delete the unused XenD and Hypervisor driver code for listing / counting domains Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Unconditionally call into xenHypervisorGetMaxVcpus and xenDaemonNodeGetInfo respectively, since those drivers are both mandatory Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The hypervisor driver is mandatory, so the the call to xenHypervisorGetVersion must always succeed. Thus there is no need to ever run xenDaemonGetVersion Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
There is no point iterating over sub-drivers since the user would not have a virConnectPtr instance at all if opening the drivers failed. Just return 'Xen' immediately. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since the Xen driver was changed to only execute inside libvirtd, there is no scenario in which it will be opened from a non-privileged context. Thus all the code dealing with opening the sub-drivers can be simplified to assume that they are always privileged. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The Xen driver uses a macro GET_PRIVATE as a supposed shorthand for 'xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) (conn)->privateData'. It does not in fact save any lines of code, and obscures what is happening. Remove it, since it adds no value. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Some of the Xen sub-drivers have checks against the VIR_CONNECT_RO flag. This is not required, since such checks are done at the top level before the driver methods are invoked Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The Xen hypervisor driver checks for 'priv->handle < 0' and returns -1, but without raising any error. Fortunately this code will never be executed, since the main Xen driver always checks 'priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET]' prior to invoking any hypervisor API. Just remove the redundant checks for priv->handle Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Daniel P. Berrange 提交于
The udevFreeIfaceDef function in the udev interface driver just duplicates code from virInterfaceDefFree. Delete it and call the standard API instead. Fix the udevGetIfaceDefVlan method so that it doesn't store pointers to the middle of a malloc'd memory area. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Osier Yang 提交于
Pushed under trivial rule
-
由 Osier Yang 提交于
Pushed under trivial rule.
-
- 08 5月, 2013 13 次提交
-
-
由 John Ferlan 提交于
-
由 Daniel P. Berrange 提交于
The LXC, QEMU, and LibXL drivers have all merged their handling of the attach/update/modify device APIs into one large 'xxxxDomainModifyDeviceFlags' which then does a 'switch()' based on the actual API being invoked. While this saves some lines of code, it is not really all that significant in the context of the driver API impls as a whole. This merger of the handling of different APIs creates pain when wanting to automated analysis of the code and do things which are specific to individual APIs. The slight duplication of code from unmerged the API impls, is preferrable to allow for easier automated analysis. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the parsing of XML is pushed down into the various migration helper APIs. This makes it difficult to insert the correct access control checks, since one helper API services many public APIs. Pull the parsing of XML up to the top level of the QEMU driver APIs
-
由 Daniel P. Berrange 提交于
Several APIs allow for custom XML to be passed in. This is checked for ABI stability, which will ensure the UUID is not being changed. There isn't validation that the name did not change though. This could allow renaming of guests via the backdoor, which in turn could allow for bypassing access control restrictions based on names. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In renaming driver API implementations to match the public API naming scheme, a few cases in the node device driver were missed. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The individual hypervisor drivers were directly referencing APIs in virnodesuspend.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver. This allows the unused virConnectPtr args to be removed from the virnodesuspend.c file. Again this will ensure that ACL checks will only be performed on invocations that are directly associated with public API usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The individual hypervisor drivers were directly referencing APIs in src/nodeinfo.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver. This allows the unused virConnectPtr args to be removed from the nodeinfo.c file. Again this will ensure that ACL checks will only be performed on invocations that are directly associated with public API usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the virGetHostname() API has a bogus virConnectPtr parameter. This is because virtualization drivers directly reference this API in their virDriverPtr tables, tieing its API design to the public virConnectGetHostname API design. This also causes problems for access control checks since these must only be done for invocations from the public API, not internal invocation. Remove the bogus virConnectPtr parameter, and make each hypervisor driver provide a dedicated function for the driver API impl. This will allow access control checks to be easily inserted later. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since PIDs can be reused, polkit prefers to be given a (PID,start time) pair. If given a PID on its own, it will attempt to lookup the start time in /proc/pid/stat, though this is subject to races. It is safer if the client app resolves the PID start time itself, because as long as the app has the client socket open, the client PID won't be reused. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
There are various methods named "virXXXXSecurityContext", which are specific to SELinux. Rename them all to "virXXXXSELinuxContext". They will still raise errors at runtime if SELinux is not compiled in Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
It is possible for $line to be undefined at first used, if the symfile doesn't have a section prefix (which is the case for auto-generated symfiles). Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Osier Yang 提交于
If the volume is of a clustered volume group, and not active, the related pool APIs fails on opening /dev/vg/lv. If the volume is suspended, it hangs on open(2) the volume. Though the best solution is to expose the volume status in volume XML, and even better to provide API to activate/deactivate the volume, but it's not the work I want to touch currently. Volume status in other status is just fine to skip. About the 5th field of lv_attr (from man lvs[8]) <quote> 5 State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid (S)uspended snapshot, snapshot (m)erge failed,suspended snapshot (M)erge failed, mapped (d)evice present without tables, mapped device present with (i)nactive table </quote>
-
由 Eric Blake 提交于
While reviewing proposed VIR_STRDUP conversions, I've already noticed several places that do: if (str && VIR_STRDUP(dest, str) < 0) which can be simplified by allowing str to be NULL (something that strdup() doesn't allow). Meanwhile, code that wants to ensure a non-NULL dest regardless of the source can check for <= 0. Also, make it part of the VIR_STRDUP contract that macro arguments are evaluated exactly once. * src/util/virstring.h (VIR_STRDUP, VIR_STRDUP_QUIET, VIR_STRNDUP) (VIR_STRNDUP_QUIET): Improve contract. * src/util/virstring.c (virStrdup, virStrndup): Change return conventions. * docs/hacking.html.in: Document this. * HACKING: Regenerate. Signed-off-by: NEric Blake <eblake@redhat.com>
-