Segfault in libsmbclient when logs cannot be opened

codegrunt at codegrunt at
Sat Sep 29 00:44:03 GMT 2001


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/
#1  0x4003d695 in reopen_logs () from /usr/lib/
#2  0x40039769 in smbc_init () from /usr/lib/
#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/

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,
                log_overflow = False;

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


Kian Win

More information about the samba-technical mailing list