mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 18:03:32 +00:00
interface_backend_netcf.c: use virConnectValidateURIPath()
Reviewed-by: Cole Robinson <crobinso@redhat.com> Suggested-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
9c57fac9b7
commit
143ef3d023
@ -200,21 +200,10 @@ netcfConnectOpen(virConnectPtr conn,
|
|||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (driver->privileged) {
|
if (!virConnectValidateURIPath(conn->uri->path,
|
||||||
if (STRNEQ(conn->uri->path, "/system")) {
|
"interface",
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
driver->privileged))
|
||||||
_("unexpected interface URI path '%s', try interface:///system"),
|
|
||||||
conn->uri->path);
|
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (STRNEQ(conn->uri->path, "/session")) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("unexpected interface URI path '%s', try interface:///session"),
|
|
||||||
conn->uri->path);
|
|
||||||
return VIR_DRV_OPEN_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (virConnectOpenEnsureACL(conn) < 0)
|
if (virConnectOpenEnsureACL(conn) < 0)
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user