mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 20:51:26 +00:00
Fix compliation of AppArmor related code
Broken by the latest commits to remove the virConnectPtr parameter from internal functions.
This commit is contained in:
parent
618e1ab349
commit
af7c18f7a2
@ -262,7 +262,7 @@ use_apparmor(void)
|
|||||||
char *libvirt_daemon = NULL;
|
char *libvirt_daemon = NULL;
|
||||||
|
|
||||||
if (virFileResolveLink("/proc/self/exe", &libvirt_daemon) < 0) {
|
if (virFileResolveLink("/proc/self/exe", &libvirt_daemon) < 0) {
|
||||||
virSecurityReportError(NULL, VIR_ERR_INTERNAL_ERROR,
|
virSecurityReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("could not find libvirtd"));
|
"%s", _("could not find libvirtd"));
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -295,7 +295,7 @@ AppArmorSecurityDriverProbe(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!virFileExists(template)) {
|
if (!virFileExists(template)) {
|
||||||
virSecurityReportError(NULL, VIR_ERR_INTERNAL_ERROR,
|
virSecurityReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("template \'%s\' does not exist"), template);
|
_("template \'%s\' does not exist"), template);
|
||||||
goto clean;
|
goto clean;
|
||||||
}
|
}
|
||||||
|
@ -690,7 +690,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctl->def = virDomainDefParseString(NULL, ctl->caps, xmlStr, 0);
|
ctl->def = virDomainDefParseString(ctl->caps, xmlStr, 0);
|
||||||
if (ctl->def == NULL) {
|
if (ctl->def == NULL) {
|
||||||
vah_error(ctl, 0, "could not parse XML");
|
vah_error(ctl, 0, "could not parse XML");
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -767,8 +767,7 @@ vah_add_file(virBufferPtr buf, const char *path, const char *perms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
file_iterate_cb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
file_iterate_cb(usbDevice *dev ATTRIBUTE_UNUSED,
|
||||||
usbDevice *dev ATTRIBUTE_UNUSED,
|
|
||||||
const char *file, void *opaque)
|
const char *file, void *opaque)
|
||||||
{
|
{
|
||||||
virBufferPtr buf = opaque;
|
virBufferPtr buf = opaque;
|
||||||
@ -844,8 +843,7 @@ get_files(vahControl * ctl)
|
|||||||
if (usb == NULL)
|
if (usb == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rc = usbDeviceFileIterate(NULL, usb,
|
rc = usbDeviceFileIterate(usb, file_iterate_cb, &buf);
|
||||||
file_iterate_cb, &buf);
|
|
||||||
usbFreeDevice(usb);
|
usbFreeDevice(usb);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
goto clean;
|
goto clean;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user