libsmbclient.so - _init - lp_load

Richard Sharpe sharpe at ns.aus.com
Mon Jan 15 13:50:35 GMT 2001


At 11:46 PM 1/14/01 +0100, Alain BARBET wrote:
>Hi,
>
>I test libsmbclient.so  and get a coredump if I try to use it. I didn't
use a 
>config file so _init return -1 without initialize smbc_file_table.
>So if I didn't stop here, I get a segmentation fault as soon as open or 
>opendir try to use smbc_file_table.
>If I update to libsmbclient.c and _init to do this:
>
>if (!lp_load(conf, True, False, False)) {
>  smbc_file_table = malloc(smbc_max_fd * sizeof(struct smbc_file *));
>  for (p = 0; p < smbc_max_fd; p++) smbc_file_table[p] = NULL;
> return -1;
> }
>All running fine without use a config file. May be there is something I 
>didn't understand or I didn't use the right way ?

The problem with this is that a lot of the code I use depends on having an
smb.conf file, and I am not sure that the defaults will be OK ...

I will think about this addition, but you might like to add a simple
smb.conf file in $HOME/.smb/smb.conf

>Regards,
>-- 
>Alain BARBET
>http://www.alianwebserver.com
>
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba






More information about the samba-technical mailing list