summaryrefslogtreecommitdiff
path: root/fishdescriptor
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2018-11-19 16:08:57 +0000
committerIan Jackson <ian.jackson@eu.citrix.com>2018-11-19 16:22:07 +0000
commit79dee035863a6967c1bb946c679f516bd9267b62 (patch)
treeb4f325990ad8ae871043ed9e7a041babe1a4cbc8 /fishdescriptor
parent23a4c1aa62682392f5accf7089d2627018c31104 (diff)
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>
Diffstat (limited to 'fishdescriptor')
-rw-r--r--fishdescriptor/py/fishdescriptor/fish.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fishdescriptor/py/fishdescriptor/fish.py b/fishdescriptor/py/fishdescriptor/fish.py
index b47ac3d..9d2d3c6 100644
--- a/fishdescriptor/py/fishdescriptor/fish.py
+++ b/fishdescriptor/py/fishdescriptor/fish.py
@@ -157,7 +157,7 @@ class Donor():
os.chmod(our_sockname, 666)
s.listen(1)
- ancil_len = d.donate(our_sockname, fds)
+ ancil_len = d.donate(sockname, fds)
(s2, dummy) = s.accept()
(msg, ancil, flags, sender) = s2.recvmsg(1, ancil_len)