From: Alexey Veretennikov <alexey.veretennikov@gmail.com>
To: 22188@debbugs.gnu.org
Subject: bug#22188: 24.5; auth-source-search ignores netrc entries with port set
Date: Wed, 16 Dec 2015 21:42:26 +0100 [thread overview]
Message-ID: <m2h9jiazwt.fsf@MacBook-Pro.lan> (raw)
The auth-source-search function ignores .authinfo entries which contains
port if port is not specified in the search.
Steps to reproduce:
1) Create a file "~/test.authinfo" with the following contents:
machine mymachine1 login user1 password pass1
machine mymachine2 login user2 password pass2 port 100
machine mymachine3 login user3 password pass3
machine mymachine4 login user4 password pass4 port 200
2) Perform in *scratch* buffer to set this file as a auth source
(require 'auth-source)
(auth-source-forget-all-cached)
(setq auth-sources '("~/test.authinfo"))
3) Run the following:
(dolist (account (auth-source-search))
(print (plist-get account :host)))
Output:
"mymachine1"
"mymachine3"
nil
4) Run the following:
(dolist (account (auth-source-search :port 100))
(print (plist-get account :host)))
Output:
"mymachine1"
"mymachine2"
"mymachine3"
nil
5) Run the following:
(dolist (account (auth-source-search :port 200))
(print (plist-get account :host)))
"mymachine1"
"mymachine3"
"mymachine4"
nil
Expected result:
In step 2 the auth-source-search function should return all 4 machines
In step 3 the auth-source-search function should return only machine2
In step 4 the auth-source-search function should return only machine4
==================
In GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0)
of 2015-08-27 on tenten-slave.macports.org
Configured using:
`configure --prefix=/opt/local --without-x --without-dbus
--without-gconf --without-libotf --without-m17n-flt --without-gpm
--without-gnutls --with-xml2 --infodir /opt/local/share/info/emacs
'CFLAGS=-pipe -Os -arch x86_64' CPPFLAGS=-I/opt/local/include
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie
-arch x86_64''
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LC_CTYPE: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Entering debugger...
Back to top level.
auth-source
nil
("~/test.authinfo")
Mark set
current-kill: Kill ring is empty
Mark set
current-kill: Kill ring is empty
Mark set
current-kill: Kill ring is empty
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mail-utils
auth-source eieio byte-opt bytecomp byte-compile cl-extra cl-loaddefs
cl-lib cconv eieio-core gnus-util mm-util help-fns mail-prsvr
password-cache help-mode easymenu debug xterm time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
multi-tty emacs)
Memory information:
((conses 16 85506 4283)
(symbols 48 18222 0)
(miscs 40 37 163)
(strings 32 13562 4449)
(string-bytes 1 398492)
(vectors 16 8949)
(vector-slots 8 352429 16861)
(floats 8 54 757)
(intervals 56 262 0)
(buffers 960 12))
next reply other threads:[~2015-12-16 20:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-16 20:42 Alexey Veretennikov [this message]
2015-12-17 18:36 ` bug#22188: 24.5; auth-source-search ignores netrc entries with port set Eli Zaretskii
2015-12-23 16:53 ` Ted Zlatanov
2015-12-24 14:22 ` Alexey Veretennikov
2015-12-24 15:09 ` Andreas Schwab
2015-12-24 15:18 ` Ted Zlatanov
2015-12-24 15:25 ` Lars Ingebrigtsen
2015-12-24 21:02 ` Ted Zlatanov
2015-12-25 20:41 ` Lars 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2h9jiazwt.fsf@MacBook-Pro.lan \
--to=alexey.veretennikov@gmail.com \
--cc=22188@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.