mailing list of musl libc
 help / color / mirror / Atom feed
* [musl] getmntent and unescaping special characters
@ 2020-08-16  9:31 maksis .
  0 siblings, 0 replies; only message in thread
From: maksis . @ 2020-08-16  9:31 UTC (permalink / raw)
  To: <>

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]


Looks like getmntent doesn't unescape certain special characters (such as whitespaces) in mount paths, which causes my application to behave incorrectly with such paths (and assumably there are also other applications that are expecting the standard behavior).


       Since fields in the mtab and fstab files are separated by whitespace,
       octal escapes are used to represent the characters space (\040), tab
       (\011), newline (\012), and backslash (\\) in those files when they
       occur in one of the four strings in a mntent structure.  The routines
       addmntent() and getmntent() will convert from string representation
       to escaped representation and back.  When converting from escaped
       representation, the sequence \134 is also converted to a backslash.

Is that something that could also be implemented in musl?

[-- Attachment #2: Type: text/html, Size: 2854 bytes --]

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

only message in thread, other threads:[~2020-08-16  9:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16  9:31 [musl] getmntent and unescaping special characters maksis .

mailing list of musl libc

This inbox may be cloned and mirrored by anyone:

	git clone --mirror

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 musl musl/ \
	public-inbox-index musl

Example config snippet for mirrors.
Newsgroup available over NNTP:

code repositories for the project(s) associated with this inbox:

AGPL code for this site: git clone