mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +00:00
Fix compile issues when SASL is disabled
This commit is contained in:
parent
0e5f5da3db
commit
2add6b3026
@ -1,3 +1,10 @@
|
|||||||
|
Wed Dec 5 14:16:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* qemud/qemud.c: Disable saslUsernameWhitelist config file
|
||||||
|
handling if SASL is disabled. (Rich Jones)
|
||||||
|
* src/remote_internal.c: Enable remoteDebug() API when SASL
|
||||||
|
is disabled too
|
||||||
|
|
||||||
Wed Dec 5 14:16:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Wed Dec 5 14:16:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* docs/libvir.html: Add page about authentication setup options
|
* docs/libvir.html: Add page about authentication setup options
|
||||||
|
@ -1644,6 +1644,7 @@ static void qemudCleanup(struct qemud_server *server) {
|
|||||||
sock = next;
|
sock = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SASL
|
||||||
if (server->saslUsernameWhitelist) {
|
if (server->saslUsernameWhitelist) {
|
||||||
char **list = server->saslUsernameWhitelist;
|
char **list = server->saslUsernameWhitelist;
|
||||||
while (*list) {
|
while (*list) {
|
||||||
@ -1652,6 +1653,7 @@ static void qemudCleanup(struct qemud_server *server) {
|
|||||||
list++;
|
list++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
virStateCleanup();
|
virStateCleanup();
|
||||||
|
|
||||||
@ -1817,6 +1819,27 @@ static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, cons
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SASL
|
||||||
|
static inline int
|
||||||
|
remoteReadSaslAllowedUsernameList (virConfPtr conf,
|
||||||
|
struct qemud_server *server,
|
||||||
|
const char *filename)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
remoteConfigGetStringList (conf, "sasl_allowed_username_list",
|
||||||
|
&server->saslUsernameWhitelist, filename);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int
|
||||||
|
remoteReadSaslAllowedUsernameList (virConfPtr conf ATTRIBUTE_UNUSED,
|
||||||
|
struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||||
|
const char *filename ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Read the config file if it exists.
|
/* Read the config file if it exists.
|
||||||
* Only used in the remote case, hence the name.
|
* Only used in the remote case, hence the name.
|
||||||
*/
|
*/
|
||||||
@ -1913,8 +1936,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
|||||||
&tls_allowed_dn_list, filename) < 0)
|
&tls_allowed_dn_list, filename) < 0)
|
||||||
goto free_and_fail;
|
goto free_and_fail;
|
||||||
|
|
||||||
if (remoteConfigGetStringList (conf, "sasl_allowed_username_list",
|
if (remoteReadSaslAllowedUsernameList (conf, server, filename) < 0)
|
||||||
&server->saslUsernameWhitelist, filename) < 0)
|
|
||||||
goto free_and_fail;
|
goto free_and_fail;
|
||||||
|
|
||||||
virConfFree (conf);
|
virConfFree (conf);
|
||||||
|
@ -163,7 +163,7 @@ remoteStartup(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SASL
|
#if HAVE_SASL || HAVE_POLKIT
|
||||||
static void
|
static void
|
||||||
remoteDebug(struct private_data *priv, const char *msg,...)
|
remoteDebug(struct private_data *priv, const char *msg,...)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user