chiark / gitweb /
basic: fallback to the fstat if we don't have access to the /proc/self/fdinfo
[elogind.git] / src / basic / mount-util.c
index d1d5d415bb29c5be732d66ce9d6e3695251d184e..16b6a586761e3753c326d2c1d48b8bdb2eeb8856 100644 (file)
@@ -161,7 +161,7 @@ int fd_is_mount_point(int fd, const char *filename, int flags) {
 
 fallback_fdinfo:
         r = fd_fdinfo_mnt_id(fd, filename, flags, &mount_id);
-        if (r == -EOPNOTSUPP)
+        if (IN_SET(r, -EOPNOTSUPP, -EACCES))
                 goto fallback_fstat;
         if (r < 0)
                 return r;