Segfault in libsmbclient when logs cannot be opened

codegrunt at rubbercookie.com codegrunt at rubbercookie.com
Sat Sep 29 00:44:03 GMT 2001


Hi.

I am using libsmbclient from CVS. It dumps core when I call
smbc_init(auth_fn, 10) and the current user does not have the access
rights to the log file.

(gdb) backtrace
#0  0x40044e14 in x_fflush () from /usr/lib/libsmbclient.so
#1  0x4003d695 in reopen_logs () from /usr/lib/libsmbclient.so
#2  0x40039769 in smbc_init () from /usr/lib/libsmbclient.so
#3  0x0804a577 in print_dir (q=@0xbffff8c0) at crawl.cpp:55
#4  0x0804ab99 in recurse_dir (path=0xbffff910) at crawl.cpp:101
#5  0x0804ac66 in main () at crawl.cpp:108
#6  0x4013a0de in __libc_start_main () from /lib/libc.so.6

My guess is that the error occurs in lib/debug.c at around
        if (!new_dbf) {
                log_overflow = True;
                DEBUG(0, ("Unable to open new log file %s: %s\n", debugf,
strerror(errno)));
                log_overflow = False;
                x_fflush(dbf);

It works fine when I provide access to the log files.

Thanks!

Regards,
Kian Win






More information about the samba-technical mailing list