chiark / gitweb /
fishdescriptor: Cope if donor is in a chroot without /proc
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 19 Nov 2018 16:08:57 +0000 (16:08 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 19 Nov 2018 16:22:07 +0000 (16:22 +0000)
commit79dee035863a6967c1bb946c679f516bd9267b62
treeb4f325990ad8ae871043ed9e7a041babe1a4cbc8
parent23a4c1aa62682392f5accf7089d2627018c31104
fishdescriptor: Cope if donor is in a chroot without /proc

`our_sockname' contains something like
  /proc/DONOR/root/run/user/UID/fishdescriptor/SOCKET

When I tested this I did it in a chroot where /proc was mounted.  In
such a chroot /proc/DONOR/root -> /.  So this works.

But if there is no /proc, it does not work.

Instead, we can can and should assume that the path in the donor is
relative to its own root.  Ie, we can just use `sockname'.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
fishdescriptor/py/fishdescriptor/fish.py