]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
fsck: Ignore /etc/fstab entries for bind mounts
authorTheodore Ts'o <tytso@mit.edu>
Thu, 20 Sep 2007 19:06:35 +0000 (15:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 20 Sep 2007 19:06:35 +0000 (15:06 -0400)
If a user specifies a bind mount with a non-zero fsck pass number, for
example:

/foo    /bar    ext3    bind,defaults   1 3

print a warning and ignore the fstab entry.

Addresses-Red-Hat-Bugzilla: #151533

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/fsck.c

index 1dcac259954db26cfee852cf68c0cdd7800af8aa..108adf662d222243eea49d47e0d6e420338fe4af 100644 (file)
@@ -867,6 +867,16 @@ static int ignore(struct fs_info *fs)
        if (fs->passno == 0)
                return 1;
 
+       /*
+        * If this is a bind mount, ignore it.
+        */
+       if (opt_in_list("bind", fs->opts)) {
+               fprintf(stderr,
+                       _("%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"),
+                       fs->mountpt);
+               return 1;
+       }
+
        interpret_type(fs);
 
        /*