util-linux/mount-ignore-autofs-entries-in-mount-listing.patch

36 lines
1.1 KiB
Diff
Raw Normal View History

2023-03-21 18:34:04 +00:00
From 9004e76b4ba716022a7c851ffa7fbd9e9e4bf073 Mon Sep 17 00:00:00 2001
From: Ian Kent <raven@themaw.net>
Date: Mon, 13 Mar 2023 09:43:02 +0800
Subject: [PATCH] mount: ignore autofs entries in mount listing
Since we can't enable use of ignoring autofs mounts that have the
"ignore" option present by default (systemd could get confused) it's
necessary to enable it for individual applications.
The mount utility is one applcation we need it for so enable it.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: John Westerdale <jwesterd@redhat.com>
Cc: Frank Hertz <fhirtz@redhat.com>
Cc: Frank Sorenson <fsorenso@redhat.com>
---
sys-utils/mount.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 6590272c7..dba6fcae9 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -124,6 +124,8 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label)
struct libmnt_fs *fs;
struct libmnt_cache *cache = NULL;
+ mnt_context_enable_noautofs(cxt, 1);
+
if (mnt_context_get_mtab(cxt, &tb))
err(MNT_EX_SYSERR, _("failed to read mtab"));
--
2.39.2