[libvirt] [PATCH 0/5] Unify check for auth and auth->cb

Marcos Paulo de Souza posted 5 patches 5 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180803002755.7269-1-marcos.souza.org@gmail.com
Test syntax-check passed
src/esx/esx_driver.c       |  7 -------
src/hyperv/hyperv_driver.c |  7 -------
src/phyp/phyp_driver.c     | 11 -----------
src/util/virauth.c         | 12 ++++++++++++
src/xenapi/xenapi_driver.c |  6 ------
5 files changed, 12 insertions(+), 31 deletions(-)
[libvirt] [PATCH 0/5] Unify check for auth and auth->cb
Posted by Marcos Paulo de Souza 5 years, 8 months ago
Hi guys,

in some drivers, auth and auth->cb are checked in connectOpen function, while in xenapi,
only auth is checked, which that could lead to a problem if cb if invalid. In
phyp, auth and auth->cb are checked twice, in getUser and getPassword.

So, this patchset adds the check for auth and auth->cb inside
virAuthGetUsername and virAuthGetPassword, making it safer for all drivers that
rely in auth callbacks.

Marcos Paulo de Souza (5):
  virauth.c: Check for valid auth callback
  esx: Drop check for auth and auth->cb
  hyperv: Drop check for auth and auth->cb
  phyp: Drop check for auth and auth->cb
  xenapi: Drop check for auth

 src/esx/esx_driver.c       |  7 -------
 src/hyperv/hyperv_driver.c |  7 -------
 src/phyp/phyp_driver.c     | 11 -----------
 src/util/virauth.c         | 12 ++++++++++++
 src/xenapi/xenapi_driver.c |  6 ------
 5 files changed, 12 insertions(+), 31 deletions(-)

-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/5] Unify check for auth and auth->cb
Posted by Michal Privoznik 5 years, 8 months ago
On 08/03/2018 02:27 AM, Marcos Paulo de Souza wrote:
> Hi guys,
> 
> in some drivers, auth and auth->cb are checked in connectOpen function, while in xenapi,
> only auth is checked, which that could lead to a problem if cb if invalid. In
> phyp, auth and auth->cb are checked twice, in getUser and getPassword.
> 
> So, this patchset adds the check for auth and auth->cb inside
> virAuthGetUsername and virAuthGetPassword, making it safer for all drivers that
> rely in auth callbacks.
> 
> Marcos Paulo de Souza (5):
>   virauth.c: Check for valid auth callback
>   esx: Drop check for auth and auth->cb
>   hyperv: Drop check for auth and auth->cb
>   phyp: Drop check for auth and auth->cb
>   xenapi: Drop check for auth
> 
>  src/esx/esx_driver.c       |  7 -------
>  src/hyperv/hyperv_driver.c |  7 -------
>  src/phyp/phyp_driver.c     | 11 -----------
>  src/util/virauth.c         | 12 ++++++++++++
>  src/xenapi/xenapi_driver.c |  6 ------
>  5 files changed, 12 insertions(+), 31 deletions(-)
> 

ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list