[PATCH] net.c (printsock): Output AF_UNIX socket address using printstr

lists at thebatcave.org.uk lists at thebatcave.org.uk
Wed Sep 26 14:48:39 UTC 2007


[ Apologies, I forgot to CC to the list. ]

Quoting "Dmitry V. Levin" <ldv at altlinux.org>:
> On Wed, Sep 26, 2007 at 10:28:58AM +0100, Neil Campbell wrote:
>> Dmitry V. Levin wrote:
>> > On Sat, Aug 25, 2007 at 01:21:00PM +0100, Neil Campbell wrote:
>> >> I was tracing some applications and found that the output of strace
>> >> included some non-printable characters, leading various tools such as
>> >> 'file' and 'less' to refuse to recognise the file as text.  It seemed
>> >> that this was due to some strange paths being included in unix domain
>> >> sockaddr structs.
>> > I propose another patch to avoid unprintable characters in output.
>>
>> In most cases however this path will be a genuine path to a file, and
>> the current code in CVS will print this in full, which is consistent
>> with how paths are handled elsewhere.
>
> That is, you suggest to use printpathn() instead?

I'm not very familiar with the strace source, but this doesn't appear 
to escape
the non-printable characters - if such support was added to printpath 
then yes,
that would sound good to me.

Neil





More information about the Strace-devel mailing list