[Samba] why do occur seg-fault at uicode_to_unix_char() - using
remote_change_password function???
yuchan
yuchan at kisti.re.kr
Fri Apr 9 06:11:09 GMT 2004
Hello everyone.
I am writing some program which change password of smb users.
so i use remote_change_password function and try it but seg-fault whenever
call unicode_to_unix_char() function.
blow my code
int setsambapassword( const char *remotehost, char *username, const char
*smboldpassword, char *password)
{
char err[1024];
int ret;
memset( &err, '\0', sizeof(err));
ret = remote_password_change(remotehost, username, smboldpassword,
password, err, sizeof(err));
if( *err)
fprintf(stderr, err);
return ret;
}
and compiling with follow option
gcc -o testsamba testsamba.c -lsmbclinet /usr/lib/libsmbclinet.a -g
and run using gdb
gdb ./testsamba
gdb> run
Program received signal SIGSEGV, Segmentation fault,
0x080850dc in unicode_to_unix_char()
gdb) where
#0 0x08085dc in unicode_to_unix_char()
#1 0x08069a27 in clistr_pull()
#2 0x08060a7b in cli_negprot()
...
...
why does this problem occur?????
Thanks.
More information about the samba
mailing list