Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
43d28dcd
Commit
43d28dcd
authored
Jun 08, 2008
by
Michael Albinus
Browse files
* auth-source.el: Precise Tramp doc.
parent
942b4750
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+4
-0
lisp/gnus/auth-source.el
lisp/gnus/auth-source.el
+9
-11
No files found.
lisp/gnus/ChangeLog
View file @
43d28dcd
2008-06-08 Michael Albinus <michael.albinus@gmx.de>
* auth-source.el: Precise Tramp doc.
2008-06-07 Glenn Morris <rgm@gnu.org>
* nnmairix.el: Remove unnecessary eval-when-compile.
...
...
lisp/gnus/auth-source.el
View file @
43d28dcd
...
...
@@ -48,14 +48,12 @@
;;; digest). If you want finer controls, explore the url-auth source
;;; code and variables.
;;; (Tramp patch pending for this!)
;;; For tramp authentication, use:
;;; machine yourmachine.com port
tram
p login testuser password testpass
;;; machine yourmachine.com port
sc
p login testuser password testpass
;;; Note that the port can be scp or ssh, for example, to match only
;;; those protocols. When you use port = tramp, you match any Tramp
;;; protocol.
;;; Note that the port denotes the Tramp connection method. When you
;;; don't use a port entry, you match any Tramp method.
;;; Code:
...
...
@@ -88,7 +86,7 @@
(
defconst
auth-source-protocols-customize
(
mapcar
(
lambda
(
a
)
(
let
((
p
(
car-safe
a
)))
(
list
'const
(
list
'const
:tag
(
upcase
(
symbol-name
p
))
p
)))
auth-source-protocols
))
...
...
@@ -154,23 +152,23 @@ Returns fallback choices (where PROTOCOL or HOST are nil) with FALLBACK t."
(
defun
auth-source-user-or-password
(
mode
host
protocol
)
"Find user or password (from the string MODE) matching HOST and PROTOCOL."
(
gnus-message
9
(
gnus-message
9
"auth-source-user-or-password: get %s for %s (%s)"
mode
host
protocol
)
(
let
(
found
)
(
dolist
(
choice
(
auth-source-pick
host
protocol
))
(
setq
found
(
netrc-machine-user-or-password
(
setq
found
(
netrc-machine-user-or-password
mode
(
plist-get
choice
:source
)
(
list
host
)
(
list
(
format
"%s"
protocol
))
(
auth-source-protocol-defaults
protocol
)))
(
when
found
(
gnus-message
9
(
gnus-message
9
"auth-source-user-or-password: found %s=%s for %s (%s)"
mode
mode
;; don't show the password
(
if
(
equal
mode
"password"
)
"SECRET"
found
)
(
if
(
equal
mode
"password"
)
"SECRET"
found
)
host
protocol
)
(
return
found
)))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment