2013-02-22 13:17:51 +01:00
|
|
|
From df77b11852d6b3495848c4123e7cbd9f099910f9 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Frederic Crozat <fcrozat@suse.com>
|
|
|
|
Date: Thu, 21 Feb 2013 15:40:52 +0100
|
|
|
|
Subject: [PATCH] detect rbind as bind mount
|
|
|
|
|
|
|
|
Correctly detect rbind mount option as bind mount.
|
|
|
|
Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
|
|
|
|
---
|
|
|
|
src/core/mount.c | 6 ++++++
|
|
|
|
src/fstab-generator/fstab-generator.c | 4 +++-
|
|
|
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
|
|
|
2013-03-20 11:29:34 +01:00
|
|
|
Index: systemd-195/src/core/mount.c
|
|
|
|
===================================================================
|
|
|
|
--- systemd-195.orig/src/core/mount.c
|
|
|
|
+++ systemd-195/src/core/mount.c
|
|
|
|
@@ -320,6 +320,12 @@ static bool mount_is_bind(MountParameter
|
2013-02-22 13:17:51 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2013-03-20 11:29:34 +01:00
|
|
|
Index: systemd-195/src/fstab-generator/fstab-generator.c
|
|
|
|
===================================================================
|
|
|
|
--- systemd-195.orig/src/fstab-generator/fstab-generator.c
|
|
|
|
+++ systemd-195/src/fstab-generator/fstab-generator.c
|
|
|
|
@@ -199,7 +199,9 @@ static bool mount_is_bind(struct mntent
|
2013-02-22 13:17:51 +01:00
|
|
|
|
|
|
|
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) {
|