public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: /proc/mounts: \r not escaped
@ 2002-04-22 21:01 Christer Palm
  0 siblings, 0 replies; only message in thread
From: Christer Palm @ 2002-04-22 21:01 UTC (permalink / raw)
  To: linux-kernel

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-22 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-22 21:01 PROBLEM: /proc/mounts: \r not escaped Christer Palm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox