]> git.ipfire.org Git - thirdparty/util-linux.git/commit
nsenter: Do not try to enter nonexisting namespaces when --all is used
authorYonatan Goldschmidt <yon.goldschmidt@gmail.com>
Fri, 12 Nov 2021 13:27:51 +0000 (15:27 +0200)
committerYonatan Goldschmidt <yon.goldschmidt@gmail.com>
Fri, 12 Nov 2021 13:27:51 +0000 (15:27 +0200)
commit2f628e8f9ff7b72c4041a79bf3ff28f214cafb6f
tree7c8479c7ff3c95f8b41161a6abb28e1233d7634b
parent0037eb44d85fef95f852866eb9778b6786ebaadf
nsenter: Do not try to enter nonexisting namespaces when --all is used

This PR changes is_same_namespace() to is_usable_namespace(). If a namespace file
is missing for the running PID, then it is considered not usable and we do not try
to enter it.

Signed-off-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
sys-utils/nsenter.c