The Samba-Bugzilla – Bug 3505
libsmbclient, user data in authentication function
Last modified: 2006-03-22 16:08:02 UTC
I discussed this problem with Derrell of having user data within ctx or some mechanism of passing user data in authentication function and Derrell replied like this and therefore i am adding the thing in bugzilla as per your instruction.
> But the problem is that i don't have any user data coming in this callback,
> what if i want to pass the SMBCTX or the (this pointer) i am working on as
> that field because i want to access the particular login, password given by
> the user for that context or particular object.
I understand your issue.
> Might be Problem Solution:
> 1. Shouldn't there be something like smbctx->userdata which can be set to
> the this pointer.
This would be easy to add.
> 2. And also can the current ctx be passed into the userdata or the userdata
> be allowed to passed so that the current class pointer be gotten and worked
Unfortunately, this, on the other hand, would not be easy to add.
Enhancements implemented in revision 14664 to SAMBA_3_0 branch. See examples/libsmbclient/testbrowse.c for an example of using the new features.