This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author baikie
Recipients baikie, loewis, pitrou, vstinner
Date 2010-09-12.19:48:23
SpamBayes Score 1.9484414e-14
Marked as misclassified No
Message-id <20100912194819.GA3701@dbwatson.ukfsn.org>
In-reply-to <1284292664.16.0.799733584706.issue8372@psf.upfronthosting.co.za>
Content
> With all the effort that went into the patch, I recommend to get it right: if there is space for the \0, include it. If the string size is exactly 108, and it's linux, write it unterminated. Else fail.
> 
> As for testing: we should then definitely have a test that, if you can create an 108 byte unix socket that its socket name is what we said it should be.

The attached patches do those things, if I understand you
correctly (the test patches add such a test for Linux, and
linux-pass-unterminated uses memset() to zero out the area
between the end of the actual path and the end of the sun_path
array).

If you're talking about including the null in the address passed
to the system call, that does no harm on Linux, but I think the
more common practice is not to include it.  The FreeBSD SUN_LEN
macro, for instance, is provided to calculate the address length
and does not include the null.
History
Date User Action Args
2010-09-12 19:48:25baikiesetrecipients: + baikie, loewis, pitrou, vstinner
2010-09-12 19:48:24baikielinkissue8372 messages
2010-09-12 19:48:23baikiecreate