mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00: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;
|
||||
}
|
||||
|
||||
if (network_driver->privileged) {
|
||||
if (STRNEQ(conn->uri->path, "/system")) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unexpected network URI path '%s', try network:///system"),
|
||||
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 (!virConnectValidateURIPath(conn->uri->path,
|
||||
"network",
|
||||
network_driver->privileged))
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
|
||||
if (virConnectOpenEnsureACL(conn) < 0)
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user