Bumped into this issue with current master (and older ones), where if there's a mount
mount {
src: "/var/run/netns"
dst: "/var/run/netns"
rw: false
is_bind: true
mandatory: false
}
then if I start bash in nsjail, create the namespace and try to access the namespace:
bash-5.1$ cat /var/run/netns/three3
cat: /var/run/netns/three3: Permission denied
But if I stop the nsjail process and start it again:
bash-5.1$ cat /var/run/netns/three3
cat: /var/run/netns/three3: Invalid argument
I know cat isn't the correct way to enter no namespace, but just here illustrating that (at least) network namespace created after the nsjail process started cannot be accessed.