* bug#10874: ange-ftp ignores comments in .netrc
@ 2012-02-23 14:09 Patrick Goltzsch
2012-02-24 8:19 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Patrick Goltzsch @ 2012-02-23 14:09 UTC (permalink / raw)
To: 10874
Hi!
Working with different logins for the same machine I came
across what seems to be a bug in ange-ftp. I'm using a
standard .netrc file to collect the various accounts on
different machines. In this case I have access with
administrative rights and an account as a normal user on the
same server:
machine test1.example.org login user password abcde
# machine test1.example.org login admin password 12345
With the dired command (C-x d) I get a listing on the remote
machine, but although the second line is commented out,
ange-ftp transmits "admin" as the login name and
"12345" as the password.
Putting the first line second gets me logged in with the
normal user account. The standard ftp command on the command
line behaves correctly.
In order to ignore any init-files I started GNU Emacs 23.3.1
(x86_64-pc-linux-gnu, GTK+ Version 2.24.5) on kubuntu 11.10
on the commandline: emacs -Q
Regards,
Patrick
--
Nota bene vernichten Sie bitte diese Zeilen.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10874: ange-ftp ignores comments in .netrc
2012-02-23 14:09 bug#10874: ange-ftp ignores comments in .netrc Patrick Goltzsch
@ 2012-02-24 8:19 ` Michael Albinus
2012-02-27 14:08 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2012-02-24 8:19 UTC (permalink / raw)
To: Patrick Goltzsch; +Cc: 10874-done
version: 24.1
thanks
Patrick Goltzsch <pgoltzsch@gmail.com> writes:
> Hi!
Hi,
> Working with different logins for the same machine I came
> across what seems to be a bug in ange-ftp.
I've fixed this in the trunk, will be available with Emacs 24.1. You
could verify it with the following patch:
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs/lisp/net/ange-ftp.el.~106977~ 2012-02-24 09:17:15.649762132 +0100
--- /home/albinus/src/emacs/lisp/net/ange-ftp.el 2012-02-24 08:34:40.253090611 +0100
***************
*** 1390,1395 ****
--- 1390,1398 ----
(run-hooks 'find-file-hook)
(setq buffer-file-name nil)
(goto-char (point-min))
+ (while (search-forward-regexp "^[ \t]*#.*$" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
(skip-chars-forward " \t\r\n")
(while (not (eobp))
(ange-ftp-parse-netrc-group))
--8<---------------cut here---------------end--------------->8---
> Regards,
>
> Patrick
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10874: ange-ftp ignores comments in .netrc
2012-02-24 8:19 ` Michael Albinus
@ 2012-02-27 14:08 ` Ted Zlatanov
2012-02-27 15:09 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2012-02-27 14:08 UTC (permalink / raw)
To: 10874
Could ange-ftp use `auth-source-search'?
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10874: ange-ftp ignores comments in .netrc
2012-02-27 14:08 ` Ted Zlatanov
@ 2012-02-27 15:09 ` Michael Albinus
0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2012-02-27 15:09 UTC (permalink / raw)
To: 10874
Ted Zlatanov <tzz@lifelogs.com> writes:
> Could ange-ftp use `auth-source-search'?
Yes, let-binding `auth-sources' to '("~/.netrc"). Everything else would
be too surprising for FTP.
Remember, that the FTP client reads also in "~/.netrc".
> Ted
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-27 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 14:09 bug#10874: ange-ftp ignores comments in .netrc Patrick Goltzsch
2012-02-24 8:19 ` Michael Albinus
2012-02-27 14:08 ` Ted Zlatanov
2012-02-27 15:09 ` Michael Albinus
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).