[libvirt] [PATCH] Auth code to review

Daniel Veillard veillard at redhat.com
Tue Jul 28 13:39:12 UTC 2009


On Sat, Jul 25, 2009 at 08:02:14AM -0400, Bryan Kearney wrote:
> ---
>  src/org/libvirt/Connect.java                  |  187 ++++++++++++++---------
>  src/org/libvirt/ConnectAuth.java              |   15 ++-
>  src/org/libvirt/Domain.java                   |    7 +-
>  src/org/libvirt/ErrorHandler.java             |    3 +-
>  src/org/libvirt/Network.java                  |    5 +-
>  src/org/libvirt/StoragePool.java              |  129 ++++++++++------
>  src/org/libvirt/StoragePoolInfo.java          |    6 +
>  src/org/libvirt/StorageVol.java               |   67 ++++++---
>  src/org/libvirt/StorageVolInfo.java           |    6 +
>  src/org/libvirt/jna/Libvirt.java              |  209 +++++++++++++++----------
>  src/org/libvirt/jna/virConnectAuth.java       |   11 ++
>  src/org/libvirt/jna/virConnectCredential.java |   12 ++
>  src/test.java                                 |   16 +-
>  13 files changed, 438 insertions(+), 235 deletions(-)
>  create mode 100644 src/org/libvirt/jna/virConnectAuth.java
>  create mode 100644 src/org/libvirt/jna/virConnectCredential.java

[...]
> +    
> +    /**
> +     * Helper function to convert UUIDs into a stirng
> +     * for the UUID calls
> +     */    
> +    public static String createUUIDString(int[] UUID) {
> +        StringBuilder uuidString = new StringBuilder() ;
> +        for (int i : UUID) {
> +            uuidString.append(i) ;
> +        }        
> +        return uuidString.toString() ;
> +    }
  seems various UUID conversion code is being accumulated, maybe an UUID
class would make sense.

[...]
> +
> +	public int authCallback(virConnectCredential[] cred, int ncred, Pointer cbdata) {
> +		System.out.println("HELLO!!!!!!!!!!!!!!!!!!!!!!!!!") ;
> +		return 1 ;
> +	}

  Obviously we are still debugging this :-)

  The patch looks fine, of course the hard point is auth and especially
debugging the whole callback handling issue. I hope this will be
resolved withough going though weird code like we did in the JNI case.

  ACK, work in progress, but we need to move,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list