Re: "CAPABILITIES did not announce any of READER, MODE-READER, POST
Urs Janßen <[email protected]> Tue, 7 Apr 2009 09:37:11 +0200
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <20090407073711.GA1290__41061.3723950975$1239089955$gmane$org@akk9.akk.org> |
On Mon, Apr 06, 2009 at 05:32:01PM -0700, Phillip Pi wrote:
> Hello! I have a weird tin startup glitch:
>
> $ tin -r
>
> tin 1.9.4 release 20090211 ("Rieclachan") [UNIX] (c) Copyright 1991-2009 Iain Lea.
> CAPABILITIES did not announce any of READER, MODE-READER, POST
>
> Why do I get this error sometimes? It seems to have started over a week
the server pretends to speak NNTP according tp RFC 3977, but doe not announce
either READER or MODE-READER or POST -> it does not allow reading access for
clients. here is a what the server says to a hand run nntp-session:
| Connected to earthlink.vsrv-sjc.supernews.net.
| Escape character is '^]'.
| 200 News.GigaNews.Com
| CAPABILITIES
| 101 capability list
| VERSION 2
| .
| MODE READER
| 480 authentication required
| QUIT
the srever is broken (it should at least announce some auth methods and/or
the mode-switchung indicator).
> ago. I have to rerun tin to make it ask me to log in like this:
>
> tin 1.9.4 release 20090211 ("Rieclachan") [UNIX] (c) Copyright 1991-2009
> Iain Lea.
> Server expects authentication.
> Please enter username: ant
you could try to start tin with the "-A" flag (and if that works, you can
put that into the environment variable $TINRC so it will be used
automatically), but i doubt that will help as CAPABILITIES didn't announce
any auth methods. the following untested patch might help (in combination
with the -A cmd-line flag), but the real problem is a non RFC compliant
server -> blame giganews/supernews.
=== modified file 'src/auth.c'
--- src/auth.c 2009-01-07 12:54:02 +0000
+++ src/auth.c 2009-04-07 07:30:06 +0000
@@ -406,7 +406,7 @@
* that the server doesn't want a password; so only ask for it if needed.
*/
if (force_auth_on_conn_open || !startup) {
- if ((nntp_caps.type == CAPABILITIES && (nntp_caps.sasl_plain || nntp_caps.authinfo_user)) || nntp_caps.type != CAPABILITIES) {
+ if ((nntp_caps.type == CAPABILITIES && (nntp_caps.sasl_plain || nntp_caps.authinfo_user) || (!nntp_caps.sasl_plain && !nntp_caps.authinfo_user)) || nntp_caps.type != CAPABILITIES) {
# ifdef USE_CURSES
int state = RawState();
# endif /* USE_CURSES */
@@ -448,19 +448,19 @@
if (ret != OK_AUTH)
# endif /* USE_SASL */
{
- if (nntp_caps.type != CAPABILITIES || (nntp_caps.type == CAPABILITIES && nntp_caps.authinfo_user))
+ if (nntp_caps.type != CAPABILITIES || (nntp_caps.type == CAPABILITIES && (nntp_caps.authinfo_user || (!nntp_caps.sasl_plain && !nntp_caps.authinfo_user)))) {
+# if DEBUG
+ if (debug & DEBUG_NNTP) {
+ if (nntp_caps.type == CAPABILITIES && (!nntp_caps.sasl_plain && !nntp_caps.authinfo_user))
+ debug_print_file("NNTP", "!!! No supported authmethod available");
+ }
+# endif /* DEBUG */
ret = do_authinfo_user(server, authuser, authpass);
+ }
}
initialized = TRUE;
my_retouch(); /* Get rid of the chaff */
}
-# ifdef DEBUG
- else {
- if (debug & DEBUG_NNTP)
- debug_print_file("NNTP", "!!! No supported authmethod available");
- }
-# endif /* DEBUG */
-
}
# ifdef DEBUG
urs
--
"Only whimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)" - Linus