* nntp-send-authinfo doesn't look at nntp-port-number
@ 2012-02-23 6:38 XeCycle
2012-02-23 11:05 ` Katsumi Yamaoka
0 siblings, 1 reply; 6+ messages in thread
From: XeCycle @ 2012-02-23 6:38 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
Hello,
I ran to a problem about Gnus not reading my stored password.
After some debug, I found I need to remove "port 563" in
.authinfo, even if I already put (nntp-port-number 563) in the
virtual server specification. It still looks for entries with
port 119, and reported zero found.
I think this should be a bug. I'm using Gnus from git:
"Ma Gnus v0.4"
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: nntp-send-authinfo doesn't look at nntp-port-number
2012-02-23 6:38 nntp-send-authinfo doesn't look at nntp-port-number XeCycle
@ 2012-02-23 11:05 ` Katsumi Yamaoka
2012-02-23 12:49 ` XeCycle
0 siblings, 1 reply; 6+ messages in thread
From: Katsumi Yamaoka @ 2012-02-23 11:05 UTC (permalink / raw)
To: XeCycle; +Cc: ding
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
XeCycle wrote:
> I ran to a problem about Gnus not reading my stored password.
> After some debug, I found I need to remove "port 563" in
> .authinfo, even if I already put (nntp-port-number 563) in the
> virtual server specification. It still looks for entries with
> port 119, and reported zero found.
> I think this should be a bug. I'm using Gnus from git:
> "Ma Gnus v0.4"
Maybe the following patch will make it work. Er, but I don't
know whether it's right to add "nntps" and "snews"...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 621 bytes --]
--- nntp.el~ 2012-02-15 09:22:23.734375000 +0000
+++ nntp.el 2012-02-23 11:02:16.234375000 +0000
@@ -1197,7 +1197,8 @@
(nth 0 (auth-source-search :max 1
:host (list nntp-address
(nnoo-current-server 'nntp))
- :port '("119" "nntp"))))
+ :port '("119" "nntp"
+ "563" "nntps" "snews"))))
(auth-user (plist-get auth-info :user))
(auth-force (plist-get auth-info :force))
(auth-passwd (plist-get auth-info :secret))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: nntp-send-authinfo doesn't look at nntp-port-number
2012-02-23 11:05 ` Katsumi Yamaoka
@ 2012-02-23 12:49 ` XeCycle
2012-02-23 23:11 ` Katsumi Yamaoka
0 siblings, 1 reply; 6+ messages in thread
From: XeCycle @ 2012-02-23 12:49 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
Katsumi Yamaoka <yamaoka@jpl.org> writes:
[...]
> Maybe the following patch will make it work. Er, but I don't
> know whether it's right to add "nntps" and "snews"...
>
> --- nntp.el~ 2012-02-15 09:22:23.734375000 +0000
> +++ nntp.el 2012-02-23 11:02:16.234375000 +0000
> @@ -1197,7 +1197,8 @@
> (nth 0 (auth-source-search :max 1
> :host (list nntp-address
> (nnoo-current-server 'nntp))
> - :port '("119" "nntp"))))
> + :port '("119" "nntp"
> + "563" "nntps" "snews"))))
> (auth-user (plist-get auth-info :user))
> (auth-force (plist-get auth-info :force))
> (auth-passwd (plist-get auth-info :secret))
Thanks for this, but is there no way to check the defined port
number? That would be more robust.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: nntp-send-authinfo doesn't look at nntp-port-number
2012-02-23 12:49 ` XeCycle
@ 2012-02-23 23:11 ` Katsumi Yamaoka
2012-02-24 15:42 ` Ted Zlatanov
0 siblings, 1 reply; 6+ messages in thread
From: Katsumi Yamaoka @ 2012-02-23 23:11 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
XeCycle wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
> [...]
>> Maybe the following patch will make it work. Er, but I don't
>> know whether it's right to add "nntps" and "snews"...
>> --- nntp.el~ 2012-02-15 09:22:23.734375000 +0000
>> +++ nntp.el 2012-02-23 11:02:16.234375000 +0000
>> @@ -1197,7 +1197,8 @@
[...]
>> - :port '("119" "nntp"))))
>> + :port '("119" "nntp"
>> + "563" "nntps" "snews"))))
[...]
> Thanks for this, but is there no way to check the defined port
> number? That would be more robust.
Ok. I've added the next one to No Gnus, Ma Gnus, and Emacs 24.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 690 bytes --]
--- nntp.el~ 2012-02-15 09:22:23.734375000 +0000
+++ nntp.el 2012-02-23 23:06:23.984375000 +0000
@@ -1196,6 +1196,9 @@
(auth-info
- (nth 0 (auth-source-search :max 1
- :host (list nntp-address
- (nnoo-current-server 'nntp))
- :port '("119" "nntp"))))
+ (nth 0 (auth-source-search
+ :max 1
+ :host (list nntp-address
+ (nnoo-current-server 'nntp))
+ :port (or (cdr (assoc (format "%s" nntp-port-number)
+ '(("563" . ("563" "nntps" "snews")))))
+ '("119" "nntp")))))
(auth-user (plist-get auth-info :user))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: nntp-send-authinfo doesn't look at nntp-port-number
2012-02-23 23:11 ` Katsumi Yamaoka
@ 2012-02-24 15:42 ` Ted Zlatanov
2012-02-25 0:41 ` Katsumi Yamaoka
0 siblings, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2012-02-24 15:42 UTC (permalink / raw)
To: ding
On Fri, 24 Feb 2012 08:11:14 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote:
KY> + :port (or (cdr (assoc (format "%s" nntp-port-number)
KY> + '(("563" . ("563" "nntps" "snews")))))
KY> + '("119" "nntp")))))
Sorry I didn't reply sooner... this could be simply
`("119" "nntp" ,(format "%s" nntp-port-number) "563" "nntps" "snews")
The order doesn't matter. It makes sense to search for all these
possible matches in the authinfo/netrc file at once, with the assumption
that it's very unlikely a user will use both port 119 and 563 on a NNTP
server, and with different passwords. WDYT?
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: nntp-send-authinfo doesn't look at nntp-port-number
2012-02-24 15:42 ` Ted Zlatanov
@ 2012-02-25 0:41 ` Katsumi Yamaoka
0 siblings, 0 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2012-02-25 0:41 UTC (permalink / raw)
To: ding
Ted Zlatanov <tzz@lifelogs.com> wrote:
> On Fri, 24 Feb 2012 08:11:14 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote:
KY> + :port (or (cdr (assoc (format "%s" nntp-port-number)
KY> + '(("563" . ("563" "nntps" "snews")))))
KY> + '("119" "nntp")))))
> Sorry I didn't reply sooner... this could be simply
> `("119" "nntp" ,(format "%s" nntp-port-number) "563" "nntps" "snews")
> The order doesn't matter. It makes sense to search for all these
> possible matches in the authinfo/netrc file at once, with the assumption
> that it's very unlikely a user will use both port 119 and 563 on a NNTP
> server, and with different passwords. WDYT?
I did it so. Thanks for following this.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-25 0:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 6:38 nntp-send-authinfo doesn't look at nntp-port-number XeCycle
2012-02-23 11:05 ` Katsumi Yamaoka
2012-02-23 12:49 ` XeCycle
2012-02-23 23:11 ` Katsumi Yamaoka
2012-02-24 15:42 ` Ted Zlatanov
2012-02-25 0:41 ` Katsumi Yamaoka
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 NNTP newsgroup(s).