diff options
author | Theodore Ts'o <tytso@mit.edu> | 2007-09-20 15:06:35 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2007-09-20 15:06:35 -0400 |
commit | ed773a263829493e4e4bf612dbec2380cf09349f (patch) | |
tree | 075f420b3b5b9687716cbd7334f06877aab29679 /misc/fsck.c | |
parent | 29cf185826e1a3434c0192bbc7993b142660323c (diff) | |
download | e2fsprogs-ed773a263829493e4e4bf612dbec2380cf09349f.tar.gz |
fsck: Ignore /etc/fstab entries for bind mounts
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>
Diffstat (limited to 'misc/fsck.c')
-rw-r--r-- | misc/fsck.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/fsck.c b/misc/fsck.c index 1dcac259..108adf66 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -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); /* |