summaryrefslogtreecommitdiff
path: root/src/basic/fd-util.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2018-08-28 09:32:18 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-08-29 17:53:00 +0200
commit9e2acd1d24a8516c94ce862e9fbf63dd8d751572 (patch)
tree9b9e70811cd12dc2b55403e57ce4d43955288573 /src/basic/fd-util.c
parentc68867da320de296917820e5a76e902a8a86be5a (diff)
downloadsystemd-9e2acd1d24a8516c94ce862e9fbf63dd8d751572.tar.gz
fd-util: accept that kcmp might fail with EPERM/EACCES
In a container the kcmp call might well be blocked; Accept that and fall back to fstat in that case.
Diffstat (limited to 'src/basic/fd-util.c')
-rw-r--r--src/basic/fd-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index e085dc23b4..b97bd191ab 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -277,7 +277,7 @@ int same_fd(int a, int b) {
return true;
if (r > 0)
return false;
- if (errno != ENOSYS)
+ if (!IN_SET(errno, ENOSYS, EACCES, EPERM))
return -errno;
/* We don't have kcmp(), use fstat() instead. */