[Libvir] PATCH: 5/10: public auth callback API

Richard W.M. Jones rjones at redhat.com
Wed Dec 5 15:50:13 UTC 2007


Daniel P. Berrange wrote:
> On Tue, Dec 04, 2007 at 12:57:39PM +0000, Richard W.M. Jones wrote:
>> Daniel P. Berrange wrote:
>>> virConnectPtr           virConnectOpenAuth      (const char *name,
>>> 						 virConnectAuthPtr auth,
>>> 						 int flags);
>> I'm a fan of callers passing in the size of the structure (as they see 
>> it).  Allows the structure to be expanded in future, and if done right 
>> can allow both forwards and backwards compatibility.
> 
> So we never came to any conclusion on this...
> 
>   - Pass sizeof(*auth) in as a param
>   - Have allocator/destroy functions for the auth param
>   - Use the flags field to indicate use/presence of extra auth members
> 
> IMHO, this whole discussion is rather over the top. The 'auth' param is
> merely a convenience to hold the data related to the auth callback, ie
> what credentials the auth callback support, the callback function pointer
> and the opaque data. There aren't going to be any params added to this
> struct, because the list of the params to the auth callback function itself
> is fixed. Adding an allocator / sizeof doesn't magically let us change
> the callback function signature.
[...]

OK, well in that case don't add anything to virConnectOpenAuth.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20071205/749c9d75/attachment-0001.bin>


More information about the libvir-list mailing list