search for: virconnectcredentialptr

Displaying 20 results from an estimated 22 matches for "virconnectcredentialptr".

2014 Jan 02
0
[PATCH] libvirt-auth: Provide a friendlier wrapper around virConnectAuthPtrDefault (RHBZ#1044014).
...b/src/guestfs-internal.h @@ -469,6 +469,7 @@ struct guestfs_h unsigned int nr_supported_credentials; int supported_credentials[NR_CREDENTIAL_TYPES]; const char *saved_libvirt_uri; /* Doesn't need to be freed. */ + bool wrapper_warning_done; unsigned int nr_requested_credentials; virConnectCredentialPtr requested_credentials; #endif diff --git a/src/libvirt-auth.c b/src/libvirt-auth.c index fb18f8a..f8ed1b1 100644 --- a/src/libvirt-auth.c +++ b/src/libvirt-auth.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #ifdef HAVE_LIBVIRT #include &...
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
...truct error_cb_stack { void * error_cb_data; }; +/* Cached queried features. */ +struct cached_feature { + char *group; + int result; +}; + /* The libguestfs handle. */ struct guestfs_h { @@ -502,6 +508,10 @@ struct guestfs_h unsigned int nr_requested_credentials; virConnectCredentialPtr requested_credentials; #endif + + /* Cached features. */ + struct cached_feature *features; + size_t nr_features; }; /* Per-filesystem data stored for inspect_os. */ diff --git a/src/handle.c b/src/handle.c index bd66717..f7b0909 100644 --- a/src/handle.c +++ b/src/handle.c @@ -422,6 +422,7...
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
...+#ifdef HAVE_LIBVIRT + /* Used by src/libvirt-auth.c. */ +#define NR_CREDENTIAL_TYPES 9 + unsigned int nr_supported_credentials; + int supported_credentials[NR_CREDENTIAL_TYPES]; + const char *saved_libvirt_uri; /* Doesn't need to be freed. */ + unsigned int nr_requested_credentials; + virConnectCredentialPtr requested_credentials; +#endif + /**** Private data for attach-methods. ****/ /* NB: This cannot be a union because of a pathological case where * the user changes attach-method while reusing the handle to launch @@ -567,4 +577,9 @@ extern int guestfs___read_db_dump (guestfs_h *g, const c...
2013 Jan 24
2
[PATCH 1/2] lib: Add CLEANUP_FREE macro which automatically calls 'free' when leaving scope.
..., (init), guestfs___cleanup_free) +/* other CLEANUP_* macros to follow */ + #define TMP_TEMPLATE_ON_STACK(g,var) \ char *ttos_tmpdir = guestfs_get_tmpdir (g); \ char var[strlen (ttos_tmpdir) + 32]; \ @@ -324,6 +337,10 @@ struct guestfs_h virConnectCredentialPtr requested_credentials; #endif +#ifndef HAVE_ATTRIBUTE_CLEANUP + struct deferred_free *deferred_frees; +#endif + /**** Private data for attach-methods. ****/ /* NB: This cannot be a union because of a pathological case where * the user changes attach-method while reusing the handle to...
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
.../* Suppresses a compiler warning. */ + (void) caml__frame; +} + +static int +_list_length (value listv) +{ + CAMLparam1 (listv); + int len = 0; + + for (; listv != Val_emptylist; listv = Field (listv, 1), ++len) {} + + CAMLreturnT (int, len); +} + +static value +Val_virconnectcredential (const virConnectCredentialPtr cred) +{ + CAMLparam0 (); + CAMLlocal1 (rv); + + rv = caml_alloc (4, 0); + Store_field (rv, 0, Val_int (cred->type - 1)); + Store_field (rv, 1, caml_copy_string (cred->prompt)); + Store_field (rv, 2, + Val_opt_const (cred->challenge, + (Val_...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |
2014 Jun 27
3
[PATCH WIP] Can't generate argv variant
Hi everyone, lately I've been getting familiar with library and working on slight re-layering of the library. It's about having locking layer in public API and tracing one layer below that (let's call it __t_ layer. I'm not very good at making up names, so this is temporary:) ). Then making sure that all generated public stuff call __t_ layer and all other internal stuff
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2019 Apr 08
12
[PATCH 43 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
Rename the current available and feature_available into internal daemon functions, and provide non-daemon functions wrapping them at library side. This will make it possible to e.g. add caching for them. Should be only refactoring, no actual behaviour change. --- daemon/available.c | 4 +- generator/actions.ml | 192 ++++++++++++++++++++++++++++----------------------- po/POTFILES |
2014 Oct 30
2
[PATCH 0/2] v2v: Add --password-file parameter (RHBZ#1158526).
These patches add the --password-file parameter, allowing you to pass a single password via a file. https://bugzilla.redhat.com/show_bug.cgi?id=1158526 Rich.
2013 Feb 18
4
[PATCH for discussion only 0/3] Implement mutexes to limit number of concurrent instances of libguestfs.
These three patches (for discussion only, NOT to be applied) implement a mutex system that lets the user limit the number of libguestfs instances that can be launched per host. There are two uses that I have identified for this: firstly so we can enable parallel-tests (the default in automake >= 1.13) without blowing up the host. Secondly oVirt has raised concerns about how to limit the
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
...CAMLparam0 (); + CAMLlocal1 (rv); + + rv = caml_alloc_custom (&custom_operations, sizeof (virConnectPtr), 0, 1); + Libvirtconn_val (rv) = conn; + + CAMLreturn (rv); +} + + static void ignore_errors (void *ignore, virErrorPtr ignore2) { @@ -111,11 +145,10 @@ libvirt_auth_default_wrapper (virConnectCredentialPtr cred, } } -virStoragePoolPtr +static virStoragePoolPtr connect_and_load_pool (value connv, value poolnamev) { CAMLparam2 (connv, poolnamev); - const char *conn_uri = NULL; const char *poolname; /* We have to assemble the error on the stack because a dynamic * string couldn'...
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 Apr 08
0
[PATCH v4 3/7] v2v: switch to ocaml-libvirt
...eturn state; - - err = virGetLastError (); - if (!err || err->code != VIR_ERR_NO_SUPPORT) - return -1; - - if (virDomainGetInfo (dom, &info) == 0) - return info.state; - - return -1; -} - -/* See lib/libvirt-auth.c for why we need this. */ -static int -libvirt_auth_default_wrapper (virConnectCredentialPtr cred, - unsigned int ncred, - void *passwordvp) -{ - const char *password = passwordvp; - unsigned int i; - - if (password) { - /* If --password-file was specified on the command line, and the - * libvirt handler is asking for a pa...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...int flags) + int flags) { char root[64] = ""; char *term = getenv ("TERM"); diff --git a/src/libvirt-auth.c b/src/libvirt-auth.c index a4a249c..dad61cd 100644 --- a/src/libvirt-auth.c +++ b/src/libvirt-auth.c @@ -136,8 +136,8 @@ libvirt_auth_callback (virConnectCredentialPtr cred, g->nr_requested_credentials = ncred; guestfs_int_call_callbacks_message (g, GUESTFS_EVENT_LIBVIRT_AUTH, - g->saved_libvirt_uri, - strlen (g->saved_libvirt_uri)); + g->saved_libvirt_uri, +...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2017 Jan 20
5
[PATCH 0/5] Rename src/ to lib/ and move common code to common/
This patch series moves some files and directories around but is only code motion (or supposed to be). A new directory, common/, is created for all of the common code which is currently shared in random ways between parts of the project. And src/ becomes lib/ (the largest change, but mostly mechanical). In full this series makes the following changes: src/libprotocol -> common/protocol