Skip to content
Permalink
Browse files Browse the repository at this point in the history
virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
  • Loading branch information
zippy2 committed Jan 11, 2016
1 parent 95c370f commit 506e9d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libvirt-domain.c
Expand Up @@ -10934,6 +10934,7 @@ virDomainGetTime(virDomainPtr dom,
virResetLastError();

virCheckDomainReturn(dom, -1);
virCheckReadOnlyGoto(dom->conn->flags, error);

if (dom->conn->driver->domainGetTime) {
int ret = dom->conn->driver->domainGetTime(dom, seconds,
Expand Down

0 comments on commit 506e9d6

Please sign in to comment.