From: Ted Zlatanov <tzz@lifelogs.com>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: 22081@debbugs.gnu.org,
Vasilij Schneidermann <v.schneidermann@gmail.com>,
Lars Magne Ingebrigtsen <larsi@gnus.org>
Subject: bug#22081: 24.5; netrc.el fails parsing authinfo items spread over multiple lines
Date: Sat, 05 Dec 2015 18:43:38 -0500 [thread overview]
Message-ID: <8737vgwjf9.fsf_-_@lifelogs.com> (raw)
In-Reply-To: <vz1k2ouwatf.fsf@gmail.com> (Andy Moreton's message of "Fri, 04 Dec 2015 14:25:00 +0000, Thu, 03 Dec 2015 13:28:24 -0500")
On Fri, 04 Dec 2015 14:25:00 +0000 Andy Moreton <andrewjmoreton@gmail.com> wrote:
AM> RFCs describe wire-protocols and interchange data formats, so I would
AM> not expect an RFC for this. The .netrc file format is from BSD UNIX.
For instance, https://tools.ietf.org/html/rfc1035 defines the format of
master zone files, and https://tools.ietf.org/html/rfc4180 defines CSV
files. The closest RFC in spirit is https://tools.ietf.org/html/rfc4155
which defines the mbox format but says
"The mbox database format is not documented in an
authoritative specification, but instead exists as a well-known output
format that is anecdotally documented, or which is only authoritatively
documented for a specific platform or tool."
Sounds familiar? :) I'm sure we can argue for a while about the nuances
of RFCs, but I hope this is enough to explain why I looked for an RFC.
My more important point was that there's no standard (or library) for
parsing netrc files. In particular, quoting is not specified as I
mentioned. The BSD spec is ambiguous and allowing multi-line entries
would not serve any practical purpose.
I did a quick survey. I first remember using netrc files with ncftp. The
documentation at http://cng.seas.rochester.edu/CNG/docs/man/ncftp.html
shows examples of the "macdef" keyword that make it clear that it just
doesn't make sense across multiple programs:
machine wuarchive.wustl.edu
macdef init
cd /graphics/gif
ls -lt
(mandatory blank line to end the macro)
Note that quoting is not shown, so it's up to the user to figure it out.
The most used implementation is probably
http://curl.haxx.se/docs/manual.html but they don't specify the syntax
and from looking at their netrc.c don't support "default" or "macdef"
keywords either.
wget just says to consult "your system manuals" but does support
"default" and "macdef" in its netrc.c so it's a bit more compliant.
I hope this was useful to illustrate my original statements.
AM> Support for arbitrary keywords, and omission of the machine token mean
AM> that emacs will parse a .netrc file that other programs reject as
AM> ill-formed. That is unhelpful: either be compatible with other programs
AM> that read .netrc, or define a new file format with a different name.
Do you have an actual example? Can you be more specific about what broke
and how? Otherwise I think it's OK to leave things as they are.
Ted
next prev parent reply other threads:[~2015-12-05 23:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 10:20 bug#22081: 24.5; netrc.el fails parsing authinfo items spread over multiple lines Vasilij Schneidermann
2015-12-03 13:55 ` Ted Zlatanov
2015-12-03 18:28 ` Glenn Morris
2015-12-04 14:25 ` Andy Moreton
2015-12-05 23:43 ` Ted Zlatanov [this message]
2015-12-07 14:14 ` Andy Moreton
2015-12-07 18:15 ` Ted Zlatanov
2015-12-08 9:35 ` Andy Moreton
2015-12-08 14:06 ` Ted Zlatanov
2015-12-14 17:57 ` Lars Magne Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737vgwjf9.fsf_-_@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=22081@debbugs.gnu.org \
--cc=andrewjmoreton@gmail.com \
--cc=larsi@gnus.org \
--cc=v.schneidermann@gmail.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).