[Mono-dev] [Fwd: UnixEndPoint]

Philipp Baer phbaer at npw.net
Thu Mar 9 11:30:26 EST 2006


Paolo Molaro wrote:
> On 03/09/06 Philipp Baer wrote:
>> it's me again. I came across another issue with UnixEndPoint:
>> - the unix socket pathname in the sockaddr structure has to
>>   be zero-terminated. I've modified the serialization method
>>   so that a trailing zero is appended.
>> - the pathname returned by a recvfrom call contains a trailing
>>   zero which is preserved by the .NET string. This leads to
>>   a different string and thus a different hash.
> 
> Maybe it's better to fix this issue at the source instead of working
> around it? If the returned string has a zero byte and the filename
> doesn't, that is a bug.
> Do you mind looking at fixing this?

Well... the only thing you could do is to truncate the endpoint
retruned by recvfrom. That's what I was doing. This can be done
if the type of socket address (sockaddr_un) is known. I've not
yet looked at the mono source as closely :)


> Otherwise it would be nice if you file a bug in bugzilla with a test
> case to reproduce, too.

Here's a testcase:

ftp://npw.net/pub/phbaer/mono/UnixEndPoint/

Should I also file it in bugzilla?


> Thanks (and sorry for the late reply)!

np. It was me who actually was unable to post the patch to
the right list... :)


phb

-- 
Philipp Baer <phbaer at npw.net> [http://www.npw.net/]
--------------- contact information ---------------
mobile |+49-179-488 26 63|  fax |+49-561-804 62 77|
most current contact details  |'whois pb4412-ripe'|
---------------- gnupg-fingerprint ----------------
|16C7 84E8 5C5F C3D6 A8F1 A4DC E4CB A9A9 F5FA FF5D|




More information about the Mono-devel-list mailing list