From 53c442ef634ecc0e29de046a2c39114013004a57 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 11 Aug 2018 22:47:22 +0900 Subject: [PATCH] util: improve comments why we ignore EACCES and EPERM Follow-up for ef454fd1936813fa45d3e3b459d43fa30be7bf49 (#9848). --- src/basic/mount-util.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c index 62f1ed4d74..1f9590ccb6 100644 --- a/src/basic/mount-util.c +++ b/src/basic/mount-util.c @@ -544,7 +544,14 @@ int bind_remount_recursive_with_mountinfo(const char *prefix, bool ro, char **bl if (IN_SET(r, 0, -ENOENT)) continue; if (IN_SET(r, -EACCES, -EPERM)) { - /* Even if root user invoke this, FUSE or NFS mount points may not be acceessed. */ + /* Even if root user invoke this, submounts under private FUSE or NFS mount points + * may not be acceessed. E.g., + * + * $ bindfs --no-allow-other ~/mnt/mnt ~/mnt/mnt + * $ bindfs --no-allow-other ~/mnt ~/mnt + * + * Then, root user cannot access the mount point ~/mnt/mnt. + * In such cases, the submounts are ignored, as we have no way to manage them. */ log_debug_errno(r, "Failed to determine '%s' is mount point or not, ignoring: %m", x); continue; }