diff options
author | Karel Zak | 2016-04-14 14:26:54 +0200 |
---|---|---|
committer | Karel Zak | 2016-04-14 14:26:54 +0200 |
commit | e778642a9eb96975fcf3baa61dfa10add628af1a (patch) | |
tree | bcd1f5f3030d19b56755abcbf71a3420e36bedcc /configure.ac | |
parent | build-sys: add --enable-libuuid-force-uuidd (diff) | |
download | kernel-qcow2-util-linux-e778642a9eb96975fcf3baa61dfa10add628af1a.tar.gz kernel-qcow2-util-linux-e778642a9eb96975fcf3baa61dfa10add628af1a.tar.xz kernel-qcow2-util-linux-e778642a9eb96975fcf3baa61dfa10add628af1a.zip |
libmount: don't support /etc/mtab by default
The file mtab is evil and already unused by mainstream distributions.
Now libmount is able to detect mtab->/proc/mounts and use
/proc/self/mountinfo if necessary. This heuristic seems overkill in
many cases. It's also dangerous on systems where mountinfo is strongly
required (systemd based distros).
This patch #ifdefs mtab code and forces libmount to always use
/proc/self/mountinfo.
The new configure option --enable-libmount-support-mtab is necessary
to enable old behavior to support mtab.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 48e994b10..5a0040301 100644 --- a/configure.ac +++ b/configure.ac @@ -962,13 +962,13 @@ AC_SUBST([LIBMOUNT_PATCH_VERSION], $PACKAGE_VERSION_RELEASE) AC_SUBST([LIBMOUNT_VERSION_INFO]) AC_DEFINE_UNQUOTED([LIBMOUNT_VERSION], ["$LIBMOUNT_VERSION"], [libmount version string]) -AC_ARG_ENABLE([libmount-force-mountinfo], - AS_HELP_STRING([--enable-libmount-force-mountinfo], [ignore /etc/mtab in all situations (recommended for systemd)]), - [], [enable_libmount_force_mountinfo=no] +AC_ARG_ENABLE([libmount-support-mtab], + AS_HELP_STRING([--enable-libmount-support-mtab], [support /etc/mtab (default is use /proc/self/mountinfo)]), + [], [enable_libmount_support_mtab=no] ) -AS_IF([test "x$enable_libmount_force_mountinfo" == xyes], [ - AC_DEFINE([USE_LIBMOUNT_FORCE_MOUNTINFO], [1], [Define to 1 if want to ignore mtab in all situations.]) +AS_IF([test "x$enable_libmount_support_mtab" == xyes], [ + AC_DEFINE([USE_LIBMOUNT_SUPPORT_MTAB], [1], [Define to 1 if want to support mtab.]) ]) |