]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: improve comments why we ignore EACCES and EPERM
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 11 Aug 2018 13:47:22 +0000 (22:47 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Aug 2018 08:16:09 +0000 (10:16 +0200)
Follow-up for ef454fd1936813fa45d3e3b459d43fa30be7bf49 (#9848).

src/basic/mount-util.c

index 62f1ed4d7460f80f7e197f6968e9d942b3751c1e..1f9590ccb6a266f99140126c38336996cf1925b8 100644 (file)
@@ -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;
                         }