From: Al Viro <viro@zeniv.linux.org.uk>
To: Ian Kent <raven@themaw.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Siddhesh Poyarekar <siddhesh@gotplt.org>,
David Howells <dhowells@redhat.com>,
Miklos Szeredi <miklos@szeredi.hu>,
Carlos Maiolino <cmaiolino@redhat.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] vfs: escape hash as well
Date: Tue, 28 Jun 2022 18:57:23 +0100 [thread overview]
Message-ID: <YrtBA8fiE+if1r5i@ZenIV> (raw)
In-Reply-To: <165637625806.37717.2027157232247047949.stgit@donald.themaw.net>
On Tue, Jun 28, 2022 at 08:30:58AM +0800, Ian Kent wrote:
> From: Siddhesh Poyarekar <siddhesh@gotplt.org>
>
> When a filesystem is mounted with a name that starts with a #:
>
> # mount '#name' /mnt/bad -t tmpfs
>
> this will cause the entry to look like this (leading space added so
> that git does not strip it out):
>
> #name /mnt/bad tmpfs rw,seclabel,relatime,inode64 0 0
>
> This breaks getmntent and any code that aims to parse fstab as well as
> /proc/mounts with the same logic since they need to strip leading spaces
> or skip over comment lines, due to which they report incorrect output or
> skip over the line respectively.
>
> Solve this by translating the hash character into its octal encoding
> equivalent so that applications can decode the name correctly.
>
> Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
> Signed-off-by: Ian Kent <raven@themaw.net>
ACK; I'll grab that one (in #work.misc - I don't believe it's #fixes
fodder).
next prev parent reply other threads:[~2022-06-28 17:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 0:30 [PATCH 0/2] vfs: fix a couple of mount table handling problems Ian Kent
2022-06-28 0:30 ` [PATCH 1/2] vfs: parse: deal with zero length string value Ian Kent
2022-06-28 17:55 ` Al Viro
2022-06-29 1:06 ` Ian Kent
2022-07-01 6:29 ` Ian Kent
2022-06-28 0:30 ` [PATCH 2/2] vfs: escape hash as well Ian Kent
2022-06-28 17:57 ` Al Viro [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-17 5:08 [PATCH 0/2] vfs: fix a couple of mount table handling problems Ian Kent
2022-06-17 5:09 ` [PATCH 2/2] vfs: escape hash as well Ian Kent
2022-06-28 13:04 ` Christian Brauner
2021-10-25 4:05 [PATCH 1/2] vfs: parse: deal with zero length string value Ian Kent
2021-10-25 4:05 ` [PATCH 2/2] vfs: escape hash as well 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=YrtBA8fiE+if1r5i@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=cmaiolino@redhat.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=raven@themaw.net \
--cc=siddhesh@gotplt.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