libsmbclient.so - _init - lp_load

Alain BARBET alian at alianwebserver.com
Sun Jan 14 22:46:21 GMT 2001


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 ?

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





More information about the samba-technical mailing list