Subject: bug#22188: 24.5; auth-source-search ignores netrc entries with port set

From: Alexey Veretennikov <[email-masked]>
Date: Thu, 24 Dec 2015 15:22:55 +0100

Hi,

The bug itself is fixed. However the behavior when port specified is
still strange. Given the same test case, the 

(dolist (account (auth-source-search :port 100 :max 999))
  (print (plist-get account :host)))

returns

"mymachine1"

"mymachine2"

"mymachine3"

Therefore all machines without ports and the one with the correct
port. I assume there should be only one result returned, the machine
with the proper port.
More, if we specify the port which doesn't exist in the list:

(dolist (account (auth-source-search :port 150 :max 999))
  (print (plist-get account :host)))

returns

"mymachine1"

"mymachine3"

- all machines without ports in test.authinfo.

Br
/Alexey

Ted Zlatanov <[email-masked]> writes:

> On Thu, 17 Dec 2015 20:36:55 +0200 Eli Zaretskii <[email-masked]> wrote: 
>
> EZ> What happened was that the function that parsed the netrc entries
> EZ> would reject any entry which had a port specified.
>
> EZ> This is now fixed on the emacs-25 branch, in commit 9384953.
>
> Thanks for fixing it!
>
> EZ> Lars, I hope it's okay to fix something in Gnus in the Emacs
> EZ> repository?  I assume you will synchronize with your repo.
>
> Katsumi Yamaoka does the synchronizations bidirectionally. I can confirm
> this bugfix was synchronized.
>
> Alexey, can you confirm the bug can be closed?
>
> Thanks
> Ted