mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
daemon: Fix build without polkit
This commit is contained in:
parent
cf2affffcc
commit
26dbed1516
@ -874,7 +874,7 @@ static void
|
|||||||
daemonConfigFree(struct daemonConfig *data);
|
daemonConfigFree(struct daemonConfig *data);
|
||||||
|
|
||||||
static struct daemonConfig*
|
static struct daemonConfig*
|
||||||
daemonConfigNew(bool privileged)
|
daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
struct daemonConfig *data;
|
struct daemonConfig *data;
|
||||||
char *localhost;
|
char *localhost;
|
||||||
@ -1034,8 +1034,10 @@ daemonConfigLoad(struct daemonConfig *data,
|
|||||||
*/
|
*/
|
||||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
|
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
|
||||||
VIR_FREE(data->unix_sock_rw_perms);
|
VIR_FREE(data->unix_sock_rw_perms);
|
||||||
if (!(data->unix_sock_rw_perms = strdup("0777")))
|
if (!(data->unix_sock_rw_perms = strdup("0777"))) {
|
||||||
goto no_memory;
|
virReportOOMError();
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
|
if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
|
||||||
@ -1091,8 +1093,6 @@ daemonConfigLoad(struct daemonConfig *data,
|
|||||||
virConfFree (conf);
|
virConfFree (conf);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
no_memory:
|
|
||||||
virReportOOMError();
|
|
||||||
error:
|
error:
|
||||||
virConfFree (conf);
|
virConfFree (conf);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -2209,7 +2209,7 @@ authdeny:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||||
virNetServerClientPtr client,
|
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||||
virNetMessageHeaderPtr hdr ATTRIBUTE_UNUSED,
|
virNetMessageHeaderPtr hdr ATTRIBUTE_UNUSED,
|
||||||
virNetMessageErrorPtr rerr,
|
virNetMessageErrorPtr rerr,
|
||||||
remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
|
remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
|
||||||
|
Loading…
Reference in New Issue
Block a user