- 24 9月, 2018 1 次提交
-
-
由 Shi Lei 提交于
This patch just fixes misaligned arguments and misaligned conditions of src/util/*.c. Signed-off-by: NShi Lei <shi_lei@massclouds.com>
-
- 08 3月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
Pass in the XPath context as we do in all other places rather than allocating a new one. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The function used the 'cleanup' label only in error cases. This patch makes the code pass the cleanup label in every case and removes few unnecessary VIR_FREEs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 11 7月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
When storage secret is parsed in virStorageEncryptionSecretParse(), virSecretLookupParseSecret() which allocates some memory. This is however never freed. ==21711== 134 bytes in 6 blocks are definitely lost in loss record 70 of 85 ==21711== at 0x4C29F80: malloc (vg_replace_malloc.c:296) ==21711== by 0xBCA0356: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4) ==21711== by 0xA9F432E: virXMLPropString (virxml.c:479) ==21711== by 0xA9D25B0: virSecretLookupParseSecret (virsecret.c:70) ==21711== by 0xA9D616E: virStorageEncryptionSecretParse (virstorageencryption.c:172) ==21711== by 0xA9D66B2: virStorageEncryptionParseXML (virstorageencryption.c:281) ==21711== by 0xA9D68DF: virStorageEncryptionParseNode (virstorageencryption.c:338) ==21711== by 0xAA12575: virDomainDiskDefParseXML (domain_conf.c:7606) ==21711== by 0xAA2CAC6: virDomainDefParseXML (domain_conf.c:16658) ==21711== by 0xAA2FC75: virDomainDefParseNode (domain_conf.c:17472) ==21711== by 0xAA2FAE4: virDomainDefParse (domain_conf.c:17419) ==21711== by 0xAA2FB72: virDomainDefParseFile (domain_conf.c:17443) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 7月, 2016 3 次提交
-
-
由 John Ferlan 提交于
For a luks device, allow the configuration of a specific cipher to be used for encrypting the volume. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Add parse and format of the luks/passphrase secret including tests for volume XML parsing. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In order to use more common code and set up for a future type, modify the encryption secret to allow the "usage" attribute or the "uuid" attribute to define the secret. The "usage" in the case of a volume secret would be the path to the volume as dictated by the backwards compatibility brought on by virStorageGenerateQcowEncryption where it set up the usage field as the vol->target.path and didn't allow someone to provide it. This carries into virSecretObjListFindByUsageLocked which takes the secret usage attribute value from from the domain disk definition and compares it against the usage type from the secret definition. Since none of the code dealing with qcow/qcow2 encryption secrets uses usage for lookup, it's a mostly cosmetic change. The real usage comes in a future path where the encryption is expanded to be a luks volume and the secret will allow definition of the usage field. This code will make use of the virSecretLookup{Parse|Format}Secret common code. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 6月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Bring style more in line with more recent code. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 20 8月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
And add a syntax-check for '){$'. It's not perfect, but better than nothing. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 20 6月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
-
- 16 5月, 2014 1 次提交
-
-
由 Eric Blake 提交于
The VIR_ENUM_DECL/VIR_ENUM_IMPL helper macros already append 'Type' to the enum name being converted; it looks silly to have functions with 'TypeType' in their name. Even though some of our enums have to have a 'Type' suffix, the corresponding string conversion functions do not. * src/conf/secret_conf.h (VIR_ENUM_DECL): Rename virSecretUsageType. * src/conf/storage_conf.h (VIR_ENUM_DECL): Rename virStoragePoolAuthType, virStoragePoolSourceAdapterType, virStoragePartedFsType. * src/conf/domain_conf.c (virDomainDiskDefParseXML) (virDomainFSDefParseXML, virDomainFSDefFormat): Update callers. * src/conf/secret_conf.c (virSecretDefParseUsage) (virSecretDefFormatUsage): Likewise. * src/conf/storage_conf.c (virStoragePoolDefParseAuth) (virStoragePoolDefParseSource, virStoragePoolSourceFormat): Likewise. * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDevices): Likewise. * src/storage/storage_backend_disk.c (virStorageBackendDiskPartFormat): Likewise. * src/util/virstorageencryption.c (virStorageEncryptionSecretParse) (virStorageEncryptionSecretFormat): Likewise. * tools/virsh-secret.c (cmdSecretList): Likewise. * src/libvirt_private.syms (secret_conf.h, storage_conf.h): Export corrected names. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 02 4月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Encryption keys can be associated with each source file in a backing chain; as such, this file belongs more in util/ where it can be used by virstoragefile.h. * src/conf/storage_encryption_conf.h: Rename... * src/util/virstorageencryption.h: ...to this. * src/conf/storage_encryption_conf.c: Rename... * src/util/virstorageencryption.c: ...to this. * src/Makefile.am (ENCRYPTION_CONF_SOURCES, CONF_SOURCES) (UTIL_SOURCES): Update to new file names. * src/libvirt_private.syms: Likewise. * src/conf/domain_conf.h: Update client. * src/conf/storage_conf.h: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 14 3月, 2014 1 次提交
-
-
由 Laine Stump 提交于
Again completely mechanical, but a lot of lines.
-
- 16 1月, 2014 1 次提交
-
-
由 Christophe Fergeau 提交于
Currently, during XML parsing, when a call to a FromString() function to get an enum value fails, the error which is reported is either VIR_ERR_CONFIG_UNSUPPORTED, VIR_ERR_INTERNAL_ERROR or VIR_ERR_XML_ERROR. This commit makes such conversion failures consistently return VIR_ERR_CONFIG_UNSUPPORTED.
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 21 12月, 2012 6 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 19 7月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
This removes all the per-file error reporting macros from the code in src/conf/ Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Use auto-indent in more places. * src/conf/storage_encryption_conf.h (virStorageEncryptionFormat): Drop parameter. * src/conf/storage_encryption_conf.c (virStorageEncryptionFormat) (virStorageEncryptionSecretFormat): Simplify with auto-indent. * src/conf/domain_conf.c (virDomainDiskDefFormat): Adjust caller. * src/conf/storage_conf.c (virStorageVolTargetDefFormat): Likewise.
-
- 22 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
In preparation for a future patch adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are intentionally left alone. * *.c: All '#include "files.h"' uses changed. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise. * src/libvirt_private.syms: Likewise. * docs/hacking.html.in: Likewise. * HACKING: Regenerate.
-
- 13 5月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
And update callers to actually respect the error
-
- 06 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
We already have virAsprintf, so picking a similar name helps for seeing a similar purpose. Furthermore, the prefix V before printf generally implies 'va_list', even though this variant was '...', and the old name got in the way of adding a new va_list version. global rename performed with: $ git grep -l virBufferVSprintf \ | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g' then revert the changes in ChangeLog-old.
-
- 09 11月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Suggested by danpb, as it's not up-to-date anymore and lacks many functions that were added to libvirtd.
-
- 19 10月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. There are lots of places where close() is being used. In this patch I am only cleaning up usage of close() in src/conf where the problems were. I also dare to declare close() as being deprecated in libvirt code base (HACKING).
-
- 11 5月, 2010 1 次提交
-
-
由 Eric Blake 提交于
For printf("%*s",foo,bar), clang complains if foo is not int: warning: field width should have type 'int', but argument has type 'unsigned int' [-Wformat] * src/conf/storage_encryption_conf.c (virStorageEncryptionSecretFormat, virStorageEncryptionFormat): Use correct type. * src/conf/storage_encryption_conf.h (virStorageEncryptionFormat): Likewise.
-
- 27 4月, 2010 1 次提交
-
-
由 David Allan 提交于
* virStorageEncryptionFormat is called from both virDomainDiskDefFormat and virStorageVolTargetDefFormat. The proper indentation in the generated XML depends on the caller. My earlier patch to fix the incorrect indentation for the domain XML broke the indentation for the storage XML. This patch adopts Laine's suggestion of requring the caller of virStorageEncryptionFormat to provide an unsigned int with the number of spaces the output should be indented. The patch modifies both callers to provide the additional argument. * Add a regression test for the domain XML * src/conf/domain_conf.c src/conf/storage_conf.c src/conf/storage_encryption_conf.c src/conf/storage_encryption_conf.h: change the indentation code * tests/qemuxml2xmltest.c tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.args tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml: add a regression test
-
- 23 4月, 2010 1 次提交
-
-
由 David Allan 提交于
* Fix for the bug reported at: https://bugzilla.redhat.com/show_bug.cgi?id=573908
-
- 10 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectPtr is no longer required for error reporting since that is recorded in a thread local. Remove use of virConnectPtr from all APIs in storage_conf.{h,c} and storage_encryption_conf.{h,c} and update all callers to match
-
- 09 2月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
由 Matthias Bolte 提交于
-