Subject: Re: newline characters in unix socket names and /proc/net/unix

From: Stephane Chazelas <[email-masked]>
Date: Tue, 17 Mar 2015 21:27:27 +0000

2015-03-14 22:33:42 +0000, Stephane Chazelas:
[...]
> it seems the kernel doesn't escape newline characters in the
> file names displayed in /proc/net/unix
[...]
> and is used by things like fuser, lsof for instance to map Inode
> to Path (and libgtop, systemd (to check which sockets are still
> in use for cleanup) at least).
[...]

A solution for fuser and lsof (at least) would be to use the new
netlink-based API where available (like "ss -ax" does on recent
systems) that doesn't have the problem.

For lsof, that would also mean (for linux-3.3 and above) that it
could display information about the peer of the socket (like it
does with lsof -E for pipes).

-- 
Stephane