From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: bug#22081: 24.5; netrc.el fails parsing authinfo items spread over multiple lines Date: Sat, 05 Dec 2015 18:43:38 -0500 Organization: =?UTF-8?Q?=D0=A2=D0=B5=D0=BE=D0=B4=D0=BE=D1=80_?= =?UTF-8?Q?=D0=97=D0=BB=D0=B0=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= @ Cienfuegos Message-ID: <8737vgwjf9.fsf_-_@lifelogs.com> References: <87fuzjvdp5.fsf@lifelogs.com> <87fuzjvdp5.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1449359128 11721 80.91.229.3 (5 Dec 2015 23:45:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2015 23:45:28 +0000 (UTC) Cc: 22081@debbugs.gnu.org, Vasilij Schneidermann , Lars Magne Ingebrigtsen To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 06 00:45:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a5MVs-0008Lf-SM for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Dec 2015 00:45:13 +0100 Original-Received: from localhost ([::1]:48105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5MVs-0008Py-43 for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Dec 2015 18:45:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5MVn-0008N5-OJ for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 18:45:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5MVk-0000jH-I9 for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 18:45:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5MVk-0000j8-Eh for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 18:45:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a5MVj-0001HP-Te for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2015 18:45:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ted Zlatanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Dec 2015 23:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22081 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22081-submit@debbugs.gnu.org id=B22081.14493590434829 (code B ref 22081); Sat, 05 Dec 2015 23:45:03 +0000 Original-Received: (at 22081) by debbugs.gnu.org; 5 Dec 2015 23:44:03 +0000 Original-Received: from localhost ([127.0.0.1]:40169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5MUk-0001Fo-8i for submit@debbugs.gnu.org; Sat, 05 Dec 2015 18:44:02 -0500 Original-Received: from mail-qg0-f41.google.com ([209.85.192.41]:32886) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5MUP-0001Ex-Ts for 22081@debbugs.gnu.org; Sat, 05 Dec 2015 18:44:00 -0500 Original-Received: by qgea14 with SMTP id a14so117992256qge.0 for <22081@debbugs.gnu.org>; Sat, 05 Dec 2015 15:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google; h=from:to:cc:subject:organization:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=mxFIsjIaq5Rg6B8Cfj92eU3Nwt41jnITf0WzLv8NhGo=; b=GQJSmbFBE3LnDoO4V8WiBTdO33EiBKQ4Efvni39le8AWlVqGzo2QsizaTrNkuQGndR PqIuXBu5gu+8yEmWvWdDLGTE+V0kTASR6t42OmV526ZqlcTGBy7OvY/hBrfTqLohr+vM bCvjteF5izDT9Tkm/W0VpBlHF22E7nrf3RMqg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=mxFIsjIaq5Rg6B8Cfj92eU3Nwt41jnITf0WzLv8NhGo=; b=kHLAlFknZJdjixRSoqd+ZT+MyrvAlSeRDK4kmb8brHIlmkHbexLrXOuanGuryPJ8Ru zqK/DPJPYTdiOvqx6ACsNTnOfOrSimuRI1e1CaV2QNJQqxFidwjuL34shfXHsxqVIzgc j0FcntPrEtpEZz2hbenRiADwHSCoWQPOthOyS6O5tXg5oJC+wUxtHU+YkNvXMuhtN9Pa g77uvMeD08zHUycp1C33HM1RirS3ckR8w4PtT/6u3aqA0j3xr/huOGs2Nns5i750O+BI 2Qbd/RhQjI2k2bg0Zt9OhyQg9SPiC6emQsUfydtZrmXZXcYWkDvVnEar8vnL86DWx3qd LWgQ== X-Gm-Message-State: ALoCoQlhYFTlezwl+xerAGHAMv6Yxvx7DwtRFZaS1rClNf+iJSIqQyjMbg36deob6/PGMrUEchVw X-Received: by 10.140.17.213 with SMTP id 79mr28305886qgd.49.1449359021432; Sat, 05 Dec 2015 15:43:41 -0800 (PST) Original-Received: from flea ([98.229.60.157]) by smtp.gmail.com with ESMTPSA id t47sm8577955qgt.28.2015.12.05.15.43.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Dec 2015 15:43:40 -0800 (PST) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Andy Moreton's message of "Fri, 04 Dec 2015 14:25:00 +0000, Thu, 03 Dec 2015 13:28:24 -0500") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109679 Archived-At: On Fri, 04 Dec 2015 14:25:00 +0000 Andy Moreton 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