[PATCH] libsmbclient APIs to set configuration file and Logging callback function

Puran Chand puran157 at gmail.com
Thu Sep 21 15:51:07 UTC 2017


Hi Andrew,


Added following 2 statements in libsmbclient.c and a dummy debug_callback
function.

smbc_setConfiguration(ctx, "../examples/smb.conf.default");
smbc_setLogCallback(ctx, NULL, debug_callback);

./examples/smb.conf.default was the only configuration I can think of to
use for smbc_setConfiguration().

Please let me know if these changes are good to go with.

Attached path file as well.


On Wed, Sep 20, 2017 at 6:43 PM, Andrew Bartlett <abartlet at samba.org> wrote:

> On Wed, 2017-09-20 at 17:42 -0400, Puran Chand wrote:
> > Hi,
> >
> > Added private_ptr to smbc_setLogCallback().
> >
> > Attached updated patch file.
>
> Can you add a test please?
>
> Ideally examples/libsmbclient would be built and hooked in to the test
> system, but that is probably too much work.
>
> There is a smaller test suite in:
> source4/torture/libsmbclient/libsmbclient.c
>
> Thanks,
>
> Andrew Bartlett
>
> > - Puran
> >
> > On Wed, Sep 20, 2017 at 4:00 PM, Puran Chand <puran157 at gmail.com>
> > wrote:
> > > Oops, missed that, working on it.
> > >
> > > Regarding documentation, is it okay if I document this in
> > > libsmbclient.h?
> > >
> > > Thanks
> > >
> > > -Puran
> > >
> > > On Wed, Sep 20, 2017 at 3:32 PM, Andrew Bartlett <abartlet at samba.or
> > > g> wrote:
> > > > On Wed, 2017-09-20 at 14:49 -0400, Puran Chand via samba-
> > > > technical
> > > > wrote:
> > > > > Hi All,
> > > > >
> > > > > Gentle reminder.
> > > > >
> > > > > This patch has trivial changes (I think).
> > > > > A quick review is highly appreciated.
> > > >
> > > > Shouldn't smbc_setLogCallback() also pass in the private pointer?
> > > >
> > > > It should also be clearly documented that the impact of these is
> > > > global, not local the the libsmbclient context.
> > > >
> > > > Andrew Bartlett
> > > > --
> > > > Andrew Bartlett                       http://samba.org/~abartlet/
> > > > Authentication Developer, Samba Team  http://samba.org
> > > > Samba Developer, Catalyst IT          http://catalyst.net.nz/serv
> > > > ices/samba
> > > >
> > > >
> > >
> > >
> >
> >
> --
> Andrew Bartlett
> https://samba.org/~abartlet/
> Authentication Developer, Samba Team         https://samba.org
> Samba Development and Support, Catalyst IT
> https://catalyst.net.nz/services/samba
>
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-libsmbclient-APIs-for-setting-configuration-fi.patch
Type: text/x-patch
Size: 14523 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170921/bd5e6247/0001-Added-libsmbclient-APIs-for-setting-configuration-fi.bin>


More information about the samba-technical mailing list