Bug in libsmbclient?

Kovalyev Sergey randoman at xfo.org.ru
Fri Oct 8 09:26:08 GMT 2004


Hello Michael,

Friday, October 8, 2004, 10:10:13 AM, you wrote:

MBA> Kovalyev Sergey said:
>> Hello!
>>
>> I just bumbed into that libsmbclient 3.0.5
>> (debian libsmbclient-3.0.5-1)
>> caughting SIGFAULT with such call:
>> smbc_stat("smb://HOST/Share/%CD");
>> Also "smb://%CD" and others like that.

MBA> Is that supposed to be a URL escape? The %NN sequence is the URL escape
MBA> sequence for a character with a numeric valud of NN in hex. For example
MBA> "smb://H%4fST/Sh%61re" is equivalent to "smb://HOST/Share". I don't know
MBA> if libsmbclient supports URL escapes but certainly the problem could be
MBA> related to that.
Hm...
Whether it interprets URLs or not, sigfault in any case is a bug :)

MBA> PS: if the problem turns out to be with the URL escape code I have a solid
MBA> url_decode function on my homepage [1]. It would have to be modified to
MBA> support non-ascii characters but I think the changes would be trivial
MBA> (e.g. change char to unsigned char and maybe tweek the H2B macro).

MBA> [1] http://www.ioplex.com/~miallen/
I need a bit another thing :)
I getting filename like "%CD..." from smbc_readdir, so, I want to
smbc_stat this name, so, if libsmbclient translates these names, I
need to get a function which will translate '%' to an appropriate
sequence ;)
....
I tested now, "%25CD" seems to work fine :)
Thanx :)

-- 
Best regards,
 Kovalyev                            mailto:randoman at xfo.org.ru



More information about the samba-technical mailing list