]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: re-fill unix socket paths with sockdiag netlink interface
authorMasatake YAMATO <yamato@redhat.com>
Fri, 21 Jul 2023 19:02:38 +0000 (04:02 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Mon, 24 Jul 2023 21:33:01 +0000 (06:33 +0900)
commit5468bb453c244531d7fa8424569bdb5b35267ea3
tree3f04da20b88ed3d2b44d9232954136a89ad2d697
parentcb3126e19180d050ca044d00e7ba3abad85ca1d8
lsfd: re-fill unix socket paths with sockdiag netlink interface

This commit is mostly based on Thomas Weißschuh's work,
https://github.com/t-8ch/util-linux/commit/06030390a5e6a16cc4b914bbf5fcedd3b6d83608.

Unlike the original work, this commit keeps /proc related code.

Unlike /proc interface, the sockdiag information source doesn't provide
enough information for filling struct unix_xinfo::st member. So this
commit uses /proc interface for filling the most of all unix_xinfo
members as before.

On the other hande, as discussed in
https://github.com/util-linux/util-linux/pull/2067, the /proc
interface in unreliable if a unix path name includes newline
characters. This commit uses the sockdiag interface to compensate
for the weakness of the /proc interface.
misc-utils/lsfd-sock-xinfo.c