mailing list of musl libc
 help / color / mirror / Atom feed
From: "maksis ." <maksis@adrenaline-network.com>
To: "musl@lists.openwall.com <musl@lists.openwall.com>"
	<musl@lists.openwall.com>
Subject: [musl] getmntent and unescaping special characters
Date: Sun, 16 Aug 2020 09:31:32 +0000
Message-ID: <HE1P192MB0010D60AAC4BA0F08F1A5644FB5E0@HE1P192MB0010.EURP192.PROD.OUTLOOK.COM> (raw)

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

Hi,

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).

From https://man7.org/linux/man-pages/man3/getmntent.3.html:

       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 --]

                 reply	other threads:[~2020-08-16  9:31 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=HE1P192MB0010D60AAC4BA0F08F1A5644FB5E0@HE1P192MB0010.EURP192.PROD.OUTLOOK.COM \
    --to=maksis@adrenaline-network.com \
    --cc=musl@lists.openwall.com \
    /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

mailing list of musl libc

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/musl

	# 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/ http://inbox.vuxu.org/musl \
		musl@inbox.vuxu.org
	public-inbox-index musl

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.musl


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

	https://git.vuxu.org/mirror/musl/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git