From: Christer Palm <palm@nogui.se>
To: linux-kernel@vger.kernel.org
Subject: PROBLEM: /proc/mounts: \r not escaped
Date: Mon, 22 Apr 2002 23:01:18 +0200 [thread overview]
Message-ID: <3CC47A1E.1050700@nogui.se> (raw)
Hi all!
Sorry to bother you all with a minor issue like this, but I didn't find
a procfs or general filesystem maintainer on the MAINTAINERS list...
The mangle() function in fs/namespace.c used to escape certain
characters in the /proc/mounts output should probably escape '\r' in
addition to those already escaped. This is because '\r' is recognized as
whitespace by some potential tokenization methods - most notably
scanf("%s") - and because it can cause confusing output from 'cat
/proc/mounts' or similar.
Not that your everyday mountpoints have names containing '\r'. OTOH, nor
is the case with '\t', which, I guess, is on the list for the very same
reason.
Cheers,
--
Christer Palm
--- linux-2.5.8/fs/namespace.c Sun Apr 14 21:18:54 2002
+++ linux-2.5.8/fs/namespace.c.palm Mon Apr 22 21:48:02 2002
@@ -184,7 +184,7 @@
static inline void mangle(struct seq_file *m, const char *s)
{
-
seq_escape(m, s, " \t\n\\");
+
seq_escape(m, s, " \t\n\r\\");
}
static int show_vfsmnt(struct seq_file *m, void *v)
reply other threads:[~2002-04-22 22:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3CC47A1E.1050700@nogui.se \
--to=palm@nogui.se \
--cc=linux-kernel@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