public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "martin.pitt at ubuntu dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/19108] New: Stop using /etc/mtab (_PATH_MOUNTED) in Linux
Date: Fri, 09 Oct 2015 14:50:00 -0000	[thread overview]
Message-ID: <bug-19108-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=19108

            Bug ID: 19108
           Summary: Stop using /etc/mtab (_PATH_MOUNTED) in Linux
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: martin.pitt at ubuntu dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

An /etc/mtab file has been a broken concept right from the start (putting info
about mounted file systems on a mounted file system), and at least in Linux
(util-linux, systemd, etc.) it has been dead for many years. Every distro,
systemd, etc. configure /etc/mtab as a symlink to /proc/mounts, but every now
and then it still happens that /etc/mtab is a file: you might keep `/etc/` in
revision control, under backup, trying to edit it, etc.

This then causes e. g. libmount's mount monitor to break, systemd 227 will not
even boot (which is way too strict, I'm currently arguing about that in
https://github.com/systemd/systemd/issues/1495), and it's generally a pointless
exercise these days -- there is just one valid value for that file (be a
symlink to /proc/mounts).

util-linux has deprecated it a while ago (offering
--enable-libmount-force-mountinfo), and 2.27.1 will cease to pay attention to
it completely (https://github.com/karelzak/util-linux/commit/02501746). glibc's
_PATH_MOUNTED seems to be pretty much the only place left that actually still
needs /etc/mtab.

So, my plea: can we pretty please get rid of this altogether, use /proc/mounts
consistently, and stop creating/using/paying attention to /etc/mtab altogether?
(At least for Linux, not sure about BSD and others).

Thank you for considering!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2015-10-09 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 14:50 martin.pitt at ubuntu dot com [this message]
2024-04-18 11:36 ` [Bug libc/19108] " jamborm at gcc dot gnu.org

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=bug-19108-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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).