[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]