mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
bridge_driver.c: 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
fac2f08bdd
commit
9902062861
@ -938,21 +938,10 @@ networkConnectOpen(virConnectPtr conn,
|
|||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (network_driver->privileged) {
|
if (!virConnectValidateURIPath(conn->uri->path,
|
||||||
if (STRNEQ(conn->uri->path, "/system")) {
|
"network",
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
network_driver->privileged))
|
||||||
_("unexpected network URI path '%s', try network:///system"),
|
return VIR_DRV_OPEN_ERROR;
|
||||||
conn->uri->path);
|
|
||||||
return VIR_DRV_OPEN_ERROR;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (STRNEQ(conn->uri->path, "/session")) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("unexpected network URI path '%s', try network:///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