Displaying 5 results from an estimated 5 matches for "libvirt_auth_callback".
2014 Jan 02
0
[PATCH] libvirt-auth: Provide a friendlier wrapper around virConnectAuthPtrDefault (RHBZ#1044014).
...rc/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 <libvirt/libvirt.h>
@@ -147,6 +148,34 @@ libvirt_auth_callback (virConnectCredentialPtr cred,
return 0;
}
+/* Libvirt provides a default authentication handler. However it is
+ * confusing to end-users
+ * (https://bugzilla.redhat.com/show_bug.cgi?id=1044014#c0).
+ *
+ * Unfortunately #1 the libvirt handler cannot easily be modified to
+ * make it non-c...
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
...g->nr_supported_credentials = ncredtypes;
+ memcpy (g->supported_credentials, credtypes, sizeof g->supported_credentials);
+
+ return 0;
+}
+
+/* This function is called back from libvirt. In turn it generates a
+ * libguestfs event to collect the desired credentials.
+ */
+static int
+libvirt_auth_callback (virConnectCredentialPtr cred,
+ unsigned int ncred,
+ void *gv)
+{
+ guestfs_h *g = gv;
+ size_t i;
+
+ if (cred == NULL || ncred == 0)
+ return 0;
+
+ /* libvirt probably does this already, but no harm in checking. */
+ for (i = 0; i < ncred;...
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->sa...
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
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.