Util-Linux Archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: util-linux <util-linux@vger.kernel.org>
Cc: fhirtz@redhat.com, John Westerdale <jwesterd@redhat.com>,
	Frank Sorenson <fsorenso@redhat.com>
Subject: [PATCH 2/2] mount: ignore autofs entries in mount listing
Date: Mon, 13 Mar 2023 09:43:02 +0800	[thread overview]
Message-ID: <167867178240.35511.8758222247656534818.stgit@donald.themaw.net> (raw)
In-Reply-To: <167867177635.35511.15003989525678735907.stgit@donald.themaw.net>

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"));
 



  reply	other threads:[~2023-03-13  1:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13  1:42 [PATCH 1/2] libmount: dont ignore autofs mounts by default Ian Kent
2023-03-13  1:43 ` Ian Kent [this message]
2023-03-15 14:32 ` Karel Zak
2023-03-15 23:12   ` Ian Kent
  -- strict thread matches above, loose matches on Subject: below --
2022-11-16  2:00 [PATCH 0/2] Add ability to use autofs mount option hint to exclude mount table list entries Ian Kent
2022-11-16  2:00 ` [PATCH 2/2] mount: ignore autofs entries in mount listing Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167867178240.35511.8758222247656534818.stgit@donald.themaw.net \
    --to=raven@themaw.net \
    --cc=fhirtz@redhat.com \
    --cc=fsorenso@redhat.com \
    --cc=jwesterd@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).