[PATCH]: wbc: expand wbcAuthUserParams to pass alternate domain\user

Steven Danneman steven.danneman at isilon.com
Tue May 19 22:10:06 GMT 2009


> - From a style PoV, I would have probably included the two new
> char *'s at the top level and not created a new struct.  It should
> be self-explanatory whether or not to use the original username/domain
> based on the wbcAuthUserParams.level value and whether the pointer(s)
> is (are) NULL.  Correct?

Hey Jerry,

Thanks for the input.  The problem with this approach is that it breaks
ABI compatibility with client apps using previous versions of
libwbclient.  Adding the char*s to the top, will shift the memory
location of all other variables in the wbcAuthUserParams structure.

There's also the issue, at least through the wb pipe interface, of not
easily being able to pass NULLs from client to server.  All fields of
winbindd_request, I believe except for the extra_data, are allocated on
the stack.  winbindd_request.auth_crap.user is an fstring.  Thus,
without some retooling we can't easily send a NULL to winbindd
indicating that the wbcAuthUserParams.response2.smb_name should be
ignored, as an empty string is a valid value, at least for
client_domain.

The versioned structure really seems like the cleanest approach, most
backwards compatible approach.

-Steven


More information about the samba-technical mailing list