GNU bug report logs - #25399
auth-source-user-and-password user argument

Previous Next

Package: emacs;

Reported by: Oscar Najera <najera.oscar <at> gmail.com>

Date: Sun, 8 Jan 2017 18:53:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Oscar Najera <najera.oscar <at> gmail.com>
To: 25399 <at> debbugs.gnu.org, tzz <at> lifelogs.com
Subject: bug#25399: [PATCH]
Date: Sun, 08 Jan 2017 19:17:43 +0100
Hello,

I tried to use the auth-source-user-and-password function with the user
argument, but it always returns a list of nil. Looking at the code I see
that the argument is not used in the auth-source-search but that a fixed
string "yourusername" is used.

With this patch I obtain the correct behavior.

Thank you for your attention,
Best regards,
Oscar

---
 lisp/auth-source.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index c26935fcc9..7402ab21d7 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -2129,7 +2129,7 @@ MODE can be \"login\" or \"password\"."
                      (if user
                          (auth-source-search
                           :host host
-                          :user "yourusername"
+                          :user user
                           :max 1
                           :require '(:user :secret)
                           :create nil)




This bug report was last modified 8 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.