/ OpenBSD : Next step : segfault

Alain BARBET alb at
Sat Mar 2 07:00:04 GMT 2002

bash-2.05$ cc -ggdb -I../../source/include/ ../../source/bin/ 
testsmbc.c -o test

(libsmbclient build with -ggdb)

bash-2.05$ ./test
Initializing the smbclient library ...: No such file or directory
Need password for //jupiter/doc
Enter workgroup: [WORKGROUP]
Enter username: [alian] estel
Enter password: [] <my_password>
Segmentation fault (core dumped)

bash-2.05$ gdb test test.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.0"...
Core was generated by `test'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/
Reading symbols from 
Reading symbols from /usr/lib/
#0  0x40038816 in dos_struni2 (dst=0xdfbfb230 "", src=0xdfbfb4a4 
"<my_password>", max_len=256)
    at lib/util_unistr.c:412
412                             SSVAL(dst,0,doscp_to_ucs2[val]);
(gdb) where
#0  0x40038816 in dos_struni2 (dst=0xdfbfb230 "", src=0xdfbfb4a4 
"<my_password>", max_len=256)
    at lib/util_unistr.c:412
#1  0x40069cf0 in E_md4hash (passwd=0xdfbfb4a4 "<my_password>", 
p16=0xdfbfb360 "") at libsmb/smbencrypt.c:68
#2  0x40069f06 in SMBNTencrypt (passwd=0xdfbfb4a4 "<my_password>", 
c8=0xdfbfc9d8 "U\b\2040H{5lg?",
    p24=0xdfbfb4a4 "<my_password>") at libsmb/smbencrypt.c:149
#3  0x400524c9 in cli_session_setup (cli=0xdfbfbca0, user=0xdfbfd3b4 "estel", 
pass=0xdfbfd2b4 "<my_password>",
    passlen=24, ntpass=0xdfbfd2b4 "<my_password>", ntpasslen=24, 
workgroup=0x7100 "WORKGROUP")
    at libsmb/cliconnect.c:91
#4  0x4001bb63 in smbc_server (server=0xdfbfd5b4 "jupiter", share=0xdfbfd4b4 
    workgroup=0x7100 "WORKGROUP", username=0xdfbfd3b4 "estel", 
password=0xdfbfd2b4 "<my_password>")
    at libsmb/libsmbclient.c:319
#5  0x4001c3eb in smbc_open (fname=0x1a58 "smb://jupiter/doc/testfile.txt", 
flags=1538, mode=438)
    at libsmb/libsmbclient.c:554
#6  0x277a in main (argc=1, argv=0xdfbfdb0c) at testsmbc.c:270

Ok I will test will later version ...
(Richard I can provide you ssh access to OpenBSD / smb server I use for test).

More information about the samba-technical mailing list