Bug 3505 - libsmbclient, user data in authentication function
libsmbclient, user data in authentication function
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient
All Linux
: P3 enhancement
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2006-02-13 04:20 UTC by linuxdude
Modified: 2006-03-22 16:08 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description linuxdude 2006-02-13 04:20:08 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
> on.

Unfortunately, this, on the other hand, would not be easy to add. 
Comment 1 Derrell Lipman 2006-03-22 16:08:02 UTC
Enhancements implemented in revision 14664 to SAMBA_3_0 branch.  See examples/libsmbclient/testbrowse.c for an example of using the new features.