Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Michal Privoznik 58b7cafc28 virauth: Report error on empty auth result
When opening a connection, it may be necessary to provide user
credentials, or some additional info (e.g. whether to trust an
ssh key). We have a special API for that: virConnectOpenAuth()
where and additional callback can be passed. This callback is
then called with _virConnectCredential struct filled partially
and it's callback's responsibility to get desired data (e.g. by
prompting user) and store it into .result member of the struct.

But we document the callback behaviour as:

  When authentication requires one or more interactions, this callback
  is invoked. For each interaction supplied, data must be gathered
  from the user and filled in to the 'result' and 'resultlen' fields.
  If an interaction cannot be filled, fill in NULL and 0.

  Returns 0 if all interactions were filled, or -1 upon error

But there are some buggy callbacks out there, which set:

  .result = NULL;
  .resultlen = 0;

and return 0. Report an error when such buggy callback is met.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2181235
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-04-03 08:34:53 +02:00
.ctags.d
.github/workflows
.gitlab/issue_templates gitlab: issue_template: Remove labelling commands 2022-06-01 12:27:10 +02:00
build-aux build: Add checks for permutable format strings 2023-04-01 11:40:36 +02:00
ci Revert "ci: Disable optimization on macos-12" 2023-03-24 17:15:15 +01:00
docs docs: Document requirements on format strings in translated messages 2023-04-01 11:40:31 +02:00
examples Use G_N_ELEMENTS() more 2023-03-13 13:29:07 +01:00
include Introduce VIR_DOMAIN_PAUSED_API_ERROR 2023-03-15 10:52:14 +01:00
po Update translation files 2023-04-01 11:43:54 +02:00
scripts build: Add checks for permutable format strings 2023-04-01 11:40:36 +02:00
src virauth: Report error on empty auth result 2023-04-03 08:34:53 +02:00
tests vircryptotest: Fix cipher test typo aes265cbc -> aes256cbc 2023-04-03 08:21:27 +02:00
tools tools: Update format strings in translated messages (part 2) 2023-04-01 11:40:36 +02:00
.ctags
.dir-locals.el build: avoid tabs that failed syntax-check 2012-09-06 09:43:46 -06:00
.editorconfig
.gitattributes Add .gitattributes file 2022-03-17 14:33:12 +01:00
.gitignore Revert ".gitignore: Ignore cscope and other *tags files" 2023-02-08 17:24:31 +01:00
.gitlab-ci.yml ci: Run libvirt-pot-check in potfile job 2023-04-01 11:40:41 +02:00
.gitmodules
.gitpublish
.mailmap
AUTHORS.rst.in AUTHORS: change my (Nikolay Shirokovskiy) email 2022-04-06 11:00:53 +03:00
config.h configure: bump min required CLang to 6.0 / XCode 10.0 2022-01-17 10:44:29 +00:00
configmake.h.in
CONTRIBUTING.rst meson: adjust our documentation to mention meson instead of autoconf 2020-08-03 09:27:09 +02:00
COPYING
COPYING.LESSER
gitdm.config
libvirt-admin.pc.in
libvirt-lxc.pc.in
libvirt-qemu.pc.in
libvirt.pc.in
libvirt.spec.in rpm: Recommend passt-selinux 2023-03-14 16:14:34 +01:00
meson_options.txt Remove support for building the sheepdog storage driver backend 2022-09-01 13:11:09 +02:00
meson.build Post-release version bump to 9.3.0 2023-04-01 09:52:31 +02:00
NEWS.rst Post-release version bump to 9.3.0 2023-04-01 09:52:31 +02:00
README.rst
run.in run: gracefully handle SIGHUP, SIGQUIT, SIGTERM 2022-03-10 08:06:12 +00:00

GitLab CI Build Status

CII Best Practices

Translation status

Libvirt API for virtualization

Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.

For some of these hypervisors, it provides a stateful management daemon which runs on the virtualization host allowing access to the API both by non-privileged local users and remote users.

Layered packages provide bindings of the libvirt C API into other languages including Python, Perl, PHP, Go, Java, OCaml, as well as mappings into object systems such as GObject, CIM and SNMP.

Further information about the libvirt project can be found on the website:

https://libvirt.org

License

The libvirt C API is distributed under the terms of GNU Lesser General Public License, version 2.1 (or later). Some parts of the code that are not part of the C library may have the more restrictive GNU General Public License, version 2.0 (or later). See the files COPYING.LESSER and COPYING for full license terms & conditions.

Installation

Instructions on building and installing libvirt can be found on the website:

https://libvirt.org/compiling.html

Contributing

The libvirt project welcomes contributions in many ways. For most components the best way to contribute is to send patches to the primary development mailing list. Further guidance on this can be found on the website:

https://libvirt.org/contribute.html

Contact

The libvirt project has two primary mailing lists:

Further details on contacting the project are available on the website:

https://libvirt.org/contact.html