]> xenbits.xensource.com Git - libvirt.git/commit
esx: Avoid using vSphere SessionIsActive function
authorMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 15 Feb 2016 20:17:49 +0000 (21:17 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 18 Feb 2016 18:28:35 +0000 (19:28 +0100)
commit647ac97ab6797fa2de58c1a8d36811a3fb915e94
treee19f07a3bd3eb9ba30ec9be72ad2f25d8c86e383
parent55e6d8cd9eac7eb2aaa4d221585e9402cf7269d5
esx: Avoid using vSphere SessionIsActive function

A login session with the vSphere API might expire after some idle time.
The esxVI_EnsureSession function uses the SessionIsActive function to
check if the current session has expired and a relogin needs to be done.

But the SessionIsActive function needs the Sessions.ValidateSession
privilege that is considered as an admin level privilege.

Only vCenter actually provides the SessionIsActive function. This results
in requiring an admin level privilege even for read-only operations on
a vCenter server.

ESX and VMware Server don't provide the SessionIsActive function and
the code already works around that. Use the same workaround for vCenter
again.

This basically reverts commit 5699034b65afd49d91dff13c46481bea545cbaac.
src/esx/esx_vi.c