]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - tests/test_config
libext2fs, tests: allow /etc/mtab file to be missing
authorTheodore Ts'o <tytso@mit.edu>
Mon, 8 Jul 2013 16:08:44 +0000 (12:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 8 Jul 2013 16:08:44 +0000 (12:08 -0400)
commit42b61c50e5af99a10fc56975ecd08ab71e4f00e8
tree27a603914f3d5673a4653386b5597715e0652fa0
parent05958122453834079195230ff054cfd6073fbc98
libext2fs, tests: allow /etc/mtab file to be missing

The environment variable EXT2FS_NO_MTAB_OK will suppress the error
code EXT2_NO_MTAB_FILE when the /etc/mtab file can not be found.  This
allows the e2fsprogs regression test suite to be run in chroots which
might not have an /etc/mtab file.

By default will still want to complain if the /etc/mtab file is
missing, since we really don't want to discourage distributions and
purveyors of embedded systems from running without an /etc/mtab file.
But if it's missing it only results in a missing sanity check that
might cause file system corruption if the file system is mounted when
programs such as e2fsck, tune2fs, or resize2fs is running, so there is
no potential security problems that might result if this environment
variable is set inappropriately.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/ismounted.c
tests/test_config