]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsns: fix netns use
authorKarel Zak <kzak@redhat.com>
Mon, 22 Apr 2024 12:28:52 +0000 (14:28 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 22 Apr 2024 12:28:52 +0000 (14:28 +0200)
commit42880f54894c1d7fd113552ff8474566a2595a0d
treeeb5ff4591e0ad979ab371bf1f6ae6a94c064b9cc
parent60546acc885243c94a7aa95e00e9105fa88a8fe6
lsns: fix netns use

 # ip netns add vpn
 # lsns -T -t net
 Segmentation fault (core dumped)

The function interpolate_missing_namespaces() reads data from /proc.
However, in the case of a persistent namespace, there is no procfs
entry for the namespace. Therefore, this function should ignore it.

Fixes: https://github.com/util-linux/util-linux/issues/2982
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsns.c