提交 68719c4b 编写于 作者: D Daniel P. Berrange

Disable all disk probing in QEMU driver & add config option to re-enable

Disk format probing is now disabled by default. A new config
option in /etc/qemu/qemu.conf will re-enable it for existing
deployments where this causes trouble
上级 f70e0809
...@@ -40,6 +40,7 @@ module Libvirtd_qemu = ...@@ -40,6 +40,7 @@ module Libvirtd_qemu =
| bool_entry "relaxed_acs_check" | bool_entry "relaxed_acs_check"
| bool_entry "vnc_allow_host_audio" | bool_entry "vnc_allow_host_audio"
| bool_entry "clear_emulator_capabilities" | bool_entry "clear_emulator_capabilities"
| bool_entry "allow_disk_format_probing"
(* Each enty in the config is one of the following three ... *) (* Each enty in the config is one of the following three ... *)
let entry = vnc_entry let entry = vnc_entry
......
...@@ -187,3 +187,15 @@ ...@@ -187,3 +187,15 @@
# exploit the privileges and possibly do damage to the host. # exploit the privileges and possibly do damage to the host.
# #
# clear_emulator_capabilities = 1 # clear_emulator_capabilities = 1
# If allow_disk_format_probing is enabled, libvirt will probe disk
# images to attempt to identify their format, when not otherwise
# specified in the XML. This is disabled by default.
#
# WARNING: Enabling probing is a security hole in almost all
# deployments. It is strongly recommended that users update their
# guest XML <disk> elements to include <driver type='XXXX'/>
# elements instead of enabling this option.
# allow_disk_format_probing = 1
...@@ -365,6 +365,10 @@ int qemudLoadDriverConfig(struct qemud_driver *driver, ...@@ -365,6 +365,10 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
CHECK_TYPE ("clear_emulator_capabilities", VIR_CONF_LONG); CHECK_TYPE ("clear_emulator_capabilities", VIR_CONF_LONG);
if (p) driver->clearEmulatorCapabilities = p->l; if (p) driver->clearEmulatorCapabilities = p->l;
p = virConfGetValue (conf, "allow_disk_format_probing");
CHECK_TYPE ("allow_disk_format_probing", VIR_CONF_LONG);
if (p) driver->allowDiskFormatProbing = p->l;
virConfFree (conf); virConfFree (conf);
return 0; return 0;
} }
......
...@@ -141,6 +141,7 @@ struct qemud_driver { ...@@ -141,6 +141,7 @@ struct qemud_driver {
unsigned int relaxedACS : 1; unsigned int relaxedACS : 1;
unsigned int vncAllowHostAudio : 1; unsigned int vncAllowHostAudio : 1;
unsigned int clearEmulatorCapabilities : 1; unsigned int clearEmulatorCapabilities : 1;
unsigned int allowDiskFormatProbing : 1;
virCapsPtr caps; virCapsPtr caps;
......
...@@ -1326,7 +1326,8 @@ qemudSecurityInit(struct qemud_driver *qemud_drv) ...@@ -1326,7 +1326,8 @@ qemudSecurityInit(struct qemud_driver *qemud_drv)
qemuSecurityDACSetDriver(qemud_drv); qemuSecurityDACSetDriver(qemud_drv);
ret = virSecurityDriverStartup(&security_drv, ret = virSecurityDriverStartup(&security_drv,
qemud_drv->securityDriverName); qemud_drv->securityDriverName,
qemud_drv->allowDiskFormatProbing);
if (ret == -1) { if (ret == -1) {
VIR_ERROR0(_("Failed to start security driver")); VIR_ERROR0(_("Failed to start security driver"));
return -1; return -1;
...@@ -3074,11 +3075,12 @@ static int qemuSetupDiskPathAllow(virDomainDiskDefPtr disk ATTRIBUTE_UNUSED, ...@@ -3074,11 +3075,12 @@ static int qemuSetupDiskPathAllow(virDomainDiskDefPtr disk ATTRIBUTE_UNUSED,
} }
static int qemuSetupDiskCgroup(virCgroupPtr cgroup, static int qemuSetupDiskCgroup(struct qemud_driver *driver,
virCgroupPtr cgroup,
virDomainDiskDefPtr disk) virDomainDiskDefPtr disk)
{ {
return virDomainDiskDefForeachPath(disk, return virDomainDiskDefForeachPath(disk,
true, driver->allowDiskFormatProbing,
true, true,
qemuSetupDiskPathAllow, qemuSetupDiskPathAllow,
cgroup); cgroup);
...@@ -3113,11 +3115,12 @@ static int qemuTeardownDiskPathDeny(virDomainDiskDefPtr disk ATTRIBUTE_UNUSED, ...@@ -3113,11 +3115,12 @@ static int qemuTeardownDiskPathDeny(virDomainDiskDefPtr disk ATTRIBUTE_UNUSED,
} }
static int qemuTeardownDiskCgroup(virCgroupPtr cgroup, static int qemuTeardownDiskCgroup(struct qemud_driver *driver,
virCgroupPtr cgroup,
virDomainDiskDefPtr disk) virDomainDiskDefPtr disk)
{ {
return virDomainDiskDefForeachPath(disk, return virDomainDiskDefForeachPath(disk,
true, driver->allowDiskFormatProbing,
true, true,
qemuTeardownDiskPathDeny, qemuTeardownDiskPathDeny,
cgroup); cgroup);
...@@ -3184,7 +3187,7 @@ static int qemuSetupCgroup(struct qemud_driver *driver, ...@@ -3184,7 +3187,7 @@ static int qemuSetupCgroup(struct qemud_driver *driver,
} }
for (i = 0; i < vm->def->ndisks ; i++) { for (i = 0; i < vm->def->ndisks ; i++) {
if (qemuSetupDiskCgroup(cgroup, vm->def->disks[i]) < 0) if (qemuSetupDiskCgroup(driver, cgroup, vm->def->disks[i]) < 0)
goto cleanup; goto cleanup;
} }
...@@ -8037,7 +8040,7 @@ static int qemudDomainAttachDevice(virDomainPtr dom, ...@@ -8037,7 +8040,7 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
vm->def->name); vm->def->name);
goto endjob; goto endjob;
} }
if (qemuSetupDiskCgroup(cgroup, dev->data.disk) < 0) if (qemuSetupDiskCgroup(driver, cgroup, dev->data.disk) < 0)
goto endjob; goto endjob;
} }
...@@ -8082,7 +8085,7 @@ static int qemudDomainAttachDevice(virDomainPtr dom, ...@@ -8082,7 +8085,7 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
/* Fallthrough */ /* Fallthrough */
} }
if (ret != 0 && cgroup) { if (ret != 0 && cgroup) {
if (qemuTeardownDiskCgroup(cgroup, dev->data.disk) < 0) if (qemuTeardownDiskCgroup(driver, cgroup, dev->data.disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s", VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(dev->data.disk->src)); NULLSTR(dev->data.disk->src));
} }
...@@ -8282,7 +8285,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom, ...@@ -8282,7 +8285,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
vm->def->name); vm->def->name);
goto endjob; goto endjob;
} }
if (qemuSetupDiskCgroup(cgroup, dev->data.disk) < 0) if (qemuSetupDiskCgroup(driver, cgroup, dev->data.disk) < 0)
goto endjob; goto endjob;
} }
...@@ -8305,7 +8308,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom, ...@@ -8305,7 +8308,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
} }
if (ret != 0 && cgroup) { if (ret != 0 && cgroup) {
if (qemuTeardownDiskCgroup(cgroup, dev->data.disk) < 0) if (qemuTeardownDiskCgroup(driver, cgroup, dev->data.disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s", VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(dev->data.disk->src)); NULLSTR(dev->data.disk->src));
} }
...@@ -8433,7 +8436,7 @@ static int qemudDomainDetachPciDiskDevice(struct qemud_driver *driver, ...@@ -8433,7 +8436,7 @@ static int qemudDomainDetachPciDiskDevice(struct qemud_driver *driver,
VIR_WARN("Unable to restore security label on %s", dev->data.disk->src); VIR_WARN("Unable to restore security label on %s", dev->data.disk->src);
if (cgroup != NULL) { if (cgroup != NULL) {
if (qemuTeardownDiskCgroup(cgroup, dev->data.disk) < 0) if (qemuTeardownDiskCgroup(driver, cgroup, dev->data.disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s", VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(dev->data.disk->src)); NULLSTR(dev->data.disk->src));
} }
...@@ -8497,7 +8500,7 @@ static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver, ...@@ -8497,7 +8500,7 @@ static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
VIR_WARN("Unable to restore security label on %s", dev->data.disk->src); VIR_WARN("Unable to restore security label on %s", dev->data.disk->src);
if (cgroup != NULL) { if (cgroup != NULL) {
if (qemuTeardownDiskCgroup(cgroup, dev->data.disk) < 0) if (qemuTeardownDiskCgroup(driver, cgroup, dev->data.disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s", VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(dev->data.disk->src)); NULLSTR(dev->data.disk->src));
} }
...@@ -9676,8 +9679,15 @@ static int qemuDomainGetBlockInfo(virDomainPtr dom, ...@@ -9676,8 +9679,15 @@ static int qemuDomainGetBlockInfo(virDomainPtr dom,
goto cleanup; goto cleanup;
} }
} else { } else {
if ((format = virStorageFileProbeFormat(disk->src)) < 0) if (driver->allowDiskFormatProbing) {
if ((format = virStorageFileProbeFormat(disk->src)) < 0)
goto cleanup;
} else {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
_("no disk format for %s and probing is disabled"),
disk->src);
goto cleanup; goto cleanup;
}
} }
if (virStorageFileGetMetadataFromFD(path, fd, if (virStorageFileGetMetadataFromFD(path, fd,
......
...@@ -117,7 +117,7 @@ qemuSecurityDACSetSecurityImageLabel(virSecurityDriverPtr drv ATTRIBUTE_UNUSED, ...@@ -117,7 +117,7 @@ qemuSecurityDACSetSecurityImageLabel(virSecurityDriverPtr drv ATTRIBUTE_UNUSED,
return 0; return 0;
return virDomainDiskDefForeachPath(disk, return virDomainDiskDefForeachPath(disk,
true, driver->allowDiskFormatProbing,
false, false,
qemuSecurityDACSetSecurityFileLabel, qemuSecurityDACSetSecurityFileLabel,
NULL); NULL);
......
...@@ -101,6 +101,8 @@ relaxed_acs_check = 1 ...@@ -101,6 +101,8 @@ relaxed_acs_check = 1
vnc_allow_host_audio = 1 vnc_allow_host_audio = 1
clear_emulator_capabilities = 0 clear_emulator_capabilities = 0
allow_disk_format_probing = 1
" "
test Libvirtd_qemu.lns get conf = test Libvirtd_qemu.lns get conf =
...@@ -212,3 +214,5 @@ clear_emulator_capabilities = 0 ...@@ -212,3 +214,5 @@ clear_emulator_capabilities = 0
{ "vnc_allow_host_audio" = "1" } { "vnc_allow_host_audio" = "1" }
{ "#empty" } { "#empty" }
{ "clear_emulator_capabilities" = "0" } { "clear_emulator_capabilities" = "0" }
{ "#empty" }
{ "allow_disk_format_probing" = "1" }
...@@ -157,6 +157,8 @@ load_profile(virSecurityDriverPtr drv, ...@@ -157,6 +157,8 @@ load_profile(virSecurityDriverPtr drv,
char *xml = NULL; char *xml = NULL;
int pipefd[2]; int pipefd[2];
pid_t child; pid_t child;
const char *probe = virSecurityDriverGetAllowDiskFormatProbing(drv)
? "1" : "0";
if (pipe(pipefd) < -1) { if (pipe(pipefd) < -1) {
virReportSystemError(errno, "%s", _("unable to create pipe")); virReportSystemError(errno, "%s", _("unable to create pipe"));
...@@ -172,19 +174,19 @@ load_profile(virSecurityDriverPtr drv, ...@@ -172,19 +174,19 @@ load_profile(virSecurityDriverPtr drv,
if (create) { if (create) {
const char *const argv[] = { const char *const argv[] = {
VIRT_AA_HELPER, "-c", "-u", profile, NULL VIRT_AA_HELPER, "-p", probe, "-c", "-u", profile, NULL
}; };
ret = virExec(argv, NULL, NULL, &child, ret = virExec(argv, NULL, NULL, &child,
pipefd[0], NULL, NULL, VIR_EXEC_NONE); pipefd[0], NULL, NULL, VIR_EXEC_NONE);
} else if (fn) { } else if (fn) {
const char *const argv[] = { const char *const argv[] = {
VIRT_AA_HELPER, "-r", "-u", profile, "-f", fn, NULL VIRT_AA_HELPER, "-p", probe, "-r", "-u", profile, "-f", fn, NULL
}; };
ret = virExec(argv, NULL, NULL, &child, ret = virExec(argv, NULL, NULL, &child,
pipefd[0], NULL, NULL, VIR_EXEC_NONE); pipefd[0], NULL, NULL, VIR_EXEC_NONE);
} else { } else {
const char *const argv[] = { const char *const argv[] = {
VIRT_AA_HELPER, "-r", "-u", profile, NULL VIRT_AA_HELPER, "-p", probe, "-r", "-u", profile, NULL
}; };
ret = virExec(argv, NULL, NULL, &child, ret = virExec(argv, NULL, NULL, &child,
pipefd[0], NULL, NULL, VIR_EXEC_NONE); pipefd[0], NULL, NULL, VIR_EXEC_NONE);
...@@ -347,9 +349,11 @@ AppArmorSecurityDriverProbe(void) ...@@ -347,9 +349,11 @@ AppArmorSecurityDriverProbe(void)
* currently not used. * currently not used.
*/ */
static int static int
AppArmorSecurityDriverOpen(virSecurityDriverPtr drv) AppArmorSecurityDriverOpen(virSecurityDriverPtr drv,
bool allowDiskFormatProbing)
{ {
virSecurityDriverSetDOI(drv, SECURITY_APPARMOR_VOID_DOI); virSecurityDriverSetDOI(drv, SECURITY_APPARMOR_VOID_DOI);
virSecurityDriverSetAllowDiskFormatProbing(drv, allowDiskFormatProbing);
return 0; return 0;
} }
......
...@@ -56,7 +56,8 @@ virSecurityDriverVerify(virDomainDefPtr def) ...@@ -56,7 +56,8 @@ virSecurityDriverVerify(virDomainDefPtr def)
int int
virSecurityDriverStartup(virSecurityDriverPtr *drv, virSecurityDriverStartup(virSecurityDriverPtr *drv,
const char *name) const char *name,
bool allowDiskFormatProbing)
{ {
unsigned int i; unsigned int i;
...@@ -72,7 +73,7 @@ virSecurityDriverStartup(virSecurityDriverPtr *drv, ...@@ -72,7 +73,7 @@ virSecurityDriverStartup(virSecurityDriverPtr *drv,
switch (tmp->probe()) { switch (tmp->probe()) {
case SECURITY_DRIVER_ENABLE: case SECURITY_DRIVER_ENABLE:
virSecurityDriverInit(tmp); virSecurityDriverInit(tmp);
if (tmp->open(tmp) == -1) { if (tmp->open(tmp, allowDiskFormatProbing) == -1) {
return -1; return -1;
} else { } else {
*drv = tmp; *drv = tmp;
...@@ -125,3 +126,14 @@ virSecurityDriverGetModel(virSecurityDriverPtr drv) ...@@ -125,3 +126,14 @@ virSecurityDriverGetModel(virSecurityDriverPtr drv)
{ {
return drv->name; return drv->name;
} }
void virSecurityDriverSetAllowDiskFormatProbing(virSecurityDriverPtr drv,
bool allowDiskFormatProbing)
{
drv->_private.allowDiskFormatProbing = allowDiskFormatProbing;
}
bool virSecurityDriverGetAllowDiskFormatProbing(virSecurityDriverPtr drv)
{
return drv->_private.allowDiskFormatProbing;
}
...@@ -33,7 +33,8 @@ typedef struct _virSecurityDriverState virSecurityDriverState; ...@@ -33,7 +33,8 @@ typedef struct _virSecurityDriverState virSecurityDriverState;
typedef virSecurityDriverState *virSecurityDriverStatePtr; typedef virSecurityDriverState *virSecurityDriverStatePtr;
typedef virSecurityDriverStatus (*virSecurityDriverProbe) (void); typedef virSecurityDriverStatus (*virSecurityDriverProbe) (void);
typedef int (*virSecurityDriverOpen) (virSecurityDriverPtr drv); typedef int (*virSecurityDriverOpen) (virSecurityDriverPtr drv,
bool allowDiskFormatProbing);
typedef int (*virSecurityDomainRestoreImageLabel) (virSecurityDriverPtr drv, typedef int (*virSecurityDomainRestoreImageLabel) (virSecurityDriverPtr drv,
virDomainObjPtr vm, virDomainObjPtr vm,
virDomainDiskDefPtr disk); virDomainDiskDefPtr disk);
...@@ -102,12 +103,14 @@ struct _virSecurityDriver { ...@@ -102,12 +103,14 @@ struct _virSecurityDriver {
*/ */
struct { struct {
char doi[VIR_SECURITY_DOI_BUFLEN]; char doi[VIR_SECURITY_DOI_BUFLEN];
bool allowDiskFormatProbing;
} _private; } _private;
}; };
/* Global methods */ /* Global methods */
int virSecurityDriverStartup(virSecurityDriverPtr *drv, int virSecurityDriverStartup(virSecurityDriverPtr *drv,
const char *name); const char *name,
bool allowDiskFormatProbing);
int int
virSecurityDriverVerify(virDomainDefPtr def); virSecurityDriverVerify(virDomainDefPtr def);
...@@ -120,7 +123,10 @@ virSecurityDriverVerify(virDomainDefPtr def); ...@@ -120,7 +123,10 @@ virSecurityDriverVerify(virDomainDefPtr def);
void virSecurityDriverInit(virSecurityDriverPtr drv); void virSecurityDriverInit(virSecurityDriverPtr drv);
int virSecurityDriverSetDOI(virSecurityDriverPtr drv, int virSecurityDriverSetDOI(virSecurityDriverPtr drv,
const char *doi); const char *doi);
void virSecurityDriverSetAllowDiskFormatProbing(virSecurityDriverPtr drv,
bool allowDiskFormatProbing);
const char *virSecurityDriverGetDOI(virSecurityDriverPtr drv); const char *virSecurityDriverGetDOI(virSecurityDriverPtr drv);
const char *virSecurityDriverGetModel(virSecurityDriverPtr drv); const char *virSecurityDriverGetModel(virSecurityDriverPtr drv);
bool virSecurityDriverGetAllowDiskFormatProbing(virSecurityDriverPtr drv);
#endif /* __VIR_SECURITY_H__ */ #endif /* __VIR_SECURITY_H__ */
...@@ -266,13 +266,15 @@ SELinuxSecurityDriverProbe(void) ...@@ -266,13 +266,15 @@ SELinuxSecurityDriverProbe(void)
} }
static int static int
SELinuxSecurityDriverOpen(virSecurityDriverPtr drv) SELinuxSecurityDriverOpen(virSecurityDriverPtr drv,
bool allowDiskFormatProbing)
{ {
/* /*
* Where will the DOI come from? SELinux configuration, or qemu * Where will the DOI come from? SELinux configuration, or qemu
* configuration? For the moment, we'll just set it to "0". * configuration? For the moment, we'll just set it to "0".
*/ */
virSecurityDriverSetDOI(drv, SECURITY_SELINUX_VOID_DOI); virSecurityDriverSetDOI(drv, SECURITY_SELINUX_VOID_DOI);
virSecurityDriverSetAllowDiskFormatProbing(drv, allowDiskFormatProbing);
return SELinuxInitialize(); return SELinuxInitialize();
} }
...@@ -467,18 +469,19 @@ SELinuxSetSecurityFileLabel(virDomainDiskDefPtr disk, ...@@ -467,18 +469,19 @@ SELinuxSetSecurityFileLabel(virDomainDiskDefPtr disk,
} }
static int static int
SELinuxSetSecurityImageLabel(virSecurityDriverPtr drv ATTRIBUTE_UNUSED, SELinuxSetSecurityImageLabel(virSecurityDriverPtr drv,
virDomainObjPtr vm, virDomainObjPtr vm,
virDomainDiskDefPtr disk) virDomainDiskDefPtr disk)
{ {
const virSecurityLabelDefPtr secdef = &vm->def->seclabel; const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
bool allowDiskFormatProbing = virSecurityDriverGetAllowDiskFormatProbing(drv);
if (secdef->type == VIR_DOMAIN_SECLABEL_STATIC) if (secdef->type == VIR_DOMAIN_SECLABEL_STATIC)
return 0; return 0;
return virDomainDiskDefForeachPath(disk, return virDomainDiskDefForeachPath(disk,
true, allowDiskFormatProbing,
false, false,
SELinuxSetSecurityFileLabel, SELinuxSetSecurityFileLabel,
secdef); secdef);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
static char *progname; static char *progname;
typedef struct { typedef struct {
bool allowDiskFormatProbing;
char uuid[PROFILE_NAME_SIZE]; /* UUID of vm */ char uuid[PROFILE_NAME_SIZE]; /* UUID of vm */
bool dryrun; /* dry run */ bool dryrun; /* dry run */
char cmd; /* 'c' create char cmd; /* 'c' create
...@@ -844,7 +845,7 @@ get_files(vahControl * ctl) ...@@ -844,7 +845,7 @@ get_files(vahControl * ctl)
for (i = 0; i < ctl->def->ndisks; i++) { for (i = 0; i < ctl->def->ndisks; i++) {
int ret = virDomainDiskDefForeachPath(ctl->def->disks[i], int ret = virDomainDiskDefForeachPath(ctl->def->disks[i],
true, ctl->allowDiskFormatProbing,
false, false,
add_file_path, add_file_path,
&buf); &buf);
...@@ -943,6 +944,7 @@ vahParseArgv(vahControl * ctl, int argc, char **argv) ...@@ -943,6 +944,7 @@ vahParseArgv(vahControl * ctl, int argc, char **argv)
{ {
int arg, idx = 0; int arg, idx = 0;
struct option opt[] = { struct option opt[] = {
{"probing", 1, 0, 'p' },
{"add", 0, 0, 'a'}, {"add", 0, 0, 'a'},
{"create", 0, 0, 'c'}, {"create", 0, 0, 'c'},
{"dryrun", 0, 0, 'd'}, {"dryrun", 0, 0, 'd'},
...@@ -991,6 +993,12 @@ vahParseArgv(vahControl * ctl, int argc, char **argv) ...@@ -991,6 +993,12 @@ vahParseArgv(vahControl * ctl, int argc, char **argv)
PROFILE_NAME_SIZE) == NULL) PROFILE_NAME_SIZE) == NULL)
vah_error(ctl, 1, "error copying UUID"); vah_error(ctl, 1, "error copying UUID");
break; break;
case 'p':
if (STREQ(optarg, "1"))
ctl->allowDiskFormatProbing = true;
else
ctl->allowDiskFormatProbing = false;
break;
default: default:
vah_error(ctl, 1, "unsupported option"); vah_error(ctl, 1, "unsupported option");
break; break;
......
...@@ -15,7 +15,7 @@ main (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) ...@@ -15,7 +15,7 @@ main (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
const char *doi, *model; const char *doi, *model;
virSecurityDriverPtr security_drv; virSecurityDriverPtr security_drv;
ret = virSecurityDriverStartup (&security_drv, "selinux"); ret = virSecurityDriverStartup (&security_drv, "selinux", false);
if (ret == -1) if (ret == -1)
{ {
fprintf (stderr, "Failed to start security driver"); fprintf (stderr, "Failed to start security driver");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册