]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab,mount: detect rbind as bind mount
authorFrederic Crozat <fcrozat@suse.com>
Thu, 21 Feb 2013 15:09:40 +0000 (16:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2013 13:43:18 +0000 (14:43 +0100)
Correctly detect rbind mount option as bind mount.

Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.

src/core/mount.c
src/fstab-generator/fstab-generator.c

index e3d298eb961a448ce13189d87615af99f861d5e6..419cf27a889ea884b062b912e121ff4f5d53793e 100644 (file)
@@ -329,6 +329,12 @@ static bool mount_is_bind(MountParameters *p) {
         if (p->fstype && streq(p->fstype, "bind"))
                 return true;
 
+        if (mount_test_option(p->options, "rbind"))
+                return true;
+
+        if (p->fstype && streq(p->fstype, "rbind"))
+                return true;
+
         return false;
 }
 
index bfeddedf6228138ef99b98d964dfdecf210cc7ca..9db4123530096f5d3be656d7f4ba22a75026234f 100644 (file)
@@ -178,7 +178,9 @@ static bool mount_is_bind(struct mntent *me) {
 
         return
                 hasmntopt(me, "bind") ||
-                streq(me->mnt_type, "bind");
+                streq(me->mnt_type, "bind") ||
+                hasmntopt(me, "rbind") ||
+                streq(me->mnt_type, "rbind");
 }
 
 static bool mount_is_network(struct mntent *me) {