From: Karel Zak Date: Tue, 2 Jun 2026 10:30:21 +0000 (+0200) Subject: build: warn when libmount udev support is disabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5648eb55f06e2dec6f2e2605a957dd01877ca4c7;p=thirdparty%2Futil-linux.git build: warn when libmount udev support is disabled Non-root tag resolution (LABEL=, UUID=) in mount/umount depends on udev support in libmount. Without it, suid mount/umount cannot resolve tags for unprivileged users since direct device probing is disabled for security reasons. Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index 12ef78a15..89e05a45d 100644 --- a/configure.ac +++ b/configure.ac @@ -2775,6 +2775,9 @@ AS_IF([test "x$enable_libmount_udev_support" != xno && test "x$build_libmount" = ) ]) AM_CONDITIONAL([USE_LIBMOUNT_UDEV_SUPPORT], [test "x$libmount_udev_support" = xyes]) +AS_IF([test "x$libmount_udev_support" != xyes && test "x$build_libmount" = xyes], [ + AC_MSG_WARN([libmount udev support is disabled; non-root tag resolution (LABEL=, UUID=) in mount/umount will not work]) +]) AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd unit files (requires systemd support)]), diff --git a/meson.build b/meson.build index d6f2572a0..0595aead9 100644 --- a/meson.build +++ b/meson.build @@ -421,6 +421,11 @@ have = cc.has_function( conf.set('USE_LIBMOUNT_UDEV_SUPPORT', get_option('build-libmount-udev-support').allowed() and have ? 1 : false) +if not (get_option('build-libmount-udev-support').allowed() and have) + warning('libmount udev support is disabled; non-root tag resolution (LABEL=, UUID=) ' + + 'in mount/umount will not work') +endif + lib_udev = dependency( 'libudev', required : get_option('systemd'))