Re: HELP! Auth bug in tin 2.4 ?
Alec Muffett <[email protected]> Wed, 21 Sep 2016 17:45:03 +0100
| Newsgroups | gmane.network.tin.user |
|---|---|
| Message-ID | <CAFWeb9+JOKB8+ywVe4QE8=3KRXpZPCJFqKLJ8zBg9KxLRn_PkQ@mail.gmail.com> |
--===============4459304973361215222==
Content-Type: multipart/alternative; boundary=001a114b3cbab5d601053d074693
--001a114b3cbab5d601053d074693
Content-Type: text/plain; charset=UTF-8
>
> no, but if you run tin in debug mode ("-D 1") the reason for trying to auth
> should show up in the log.
>
Hi Urs!
This appears substantially similar to what I sent previously.
The message "nntp_open() authenticate()" corresponds with auth.c line 1432
...and if I read it right it has decided to authenticate on the basis of:
if (force_auth_on_conn_open ||
(nntp_caps.type == CAPABILITIES &&
!nntp_caps.reader &&
(nntp_caps.authinfo_user || (nntp_caps.authinfo_sasl & SASL_PLAIN))))
Adding some extra debug statements shows that this expression evaluates to
True because all of:
* nntp_caps.type == CAPABILITIES
* !nntp_caps.reader
* nntp_caps.authinfo_user
...are true (and the other expressions are false) but I don't follow why
this tuple of booleans should require Tin to authenticate?
There is a comment in the code:
* If the user wants us to authenticate on connection startup, do
it now.
* Some news servers return "201 no posting" first, but after
successful
* authentication you get a "200 posting allowed". To find out if
we are
* allowed to post after authentication issue a "MODE READER" again
and
* interpret the response code.
...but again this seems not relevant to the situation?
I am wondering whether this is a bug/not commonly encountered case, because
I am connecting to INN from an IP which also _feeds_ the server, so article
Feeding requires Auth but article Reading/Posting does not?
That might line up because, Gnus, etc, all do MODE READER and _then_ check
whether they need to authenticate - which, in this case, they do not.
-a
nntp_open() BEGIN
nntp_open() usenet:119
<<< [16:22:36.471330] 200 usenet InterNetNews server INN 2.6.0 ready
(transit mode)
nntp_open() usenet InterNetNews server INN 2.6.0 ready (transit mode)
new_nntp_command(CAPABILITIES)
>>> [16:22:36.472123] CAPABILITIES
<<< [16:22:36.664325] 101 Capability list:
new_nntp_command(CAPABILITIES) OK
<<< [16:22:36.690737] VERSION 2
<<< [16:22:36.690945] IMPLEMENTATION INN 2.6.0
<<< [16:22:36.691058] AUTHINFO USER
<<< [16:22:36.691162] MODE-READER
nntp_open() authenticate()
nntp_open() MODE READER
>>> [16:22:36.691528] MODE READER
<<< [16:22:37.959359] 200 usenet InterNetNews NNRP server INN 2.6.0 ready
(posting ok)
new_nntp_command(CAPABILITIES)
>>> [16:22:37.960847] CAPABILITIES
<<< [16:22:38.092218] 101 Capability list:
new_nntp_command(CAPABILITIES) OK
<<< [16:22:38.119069] VERSION 2
<<< [16:22:38.119294] IMPLEMENTATION INN 2.6.0
<<< [16:22:38.145393] AUTHINFO SASL
<<< [16:22:38.145623] HDR
<<< [16:22:38.145822] LIST ACTIVE ACTIVE.TIMES COUNTS DISTRIB.PATS
DISTRIBUTIONS HEADERS MODERATORS MOTD NEWSGROUPS OVERVIEW.FMT SUBSCRIPTIONS
<<< [16:22:38.145961] OVER
<<< [16:22:38.146076] POST
<<< [16:22:38.146204] READER
<<< [16:22:38.146329] SASL DIGEST-MD5 NTLM CRAM-MD5
<<< [16:22:38.146462] STARTTLS
authorization failed
nntp_close() END
nntp_command(QUIT)
>>> [16:22:41.994303] QUIT
<<< [16:22:42.128402] 205 Bye!
nntp_command(QUIT) OK
--
http://dropsafe.crypticide.com/aboutalecm
--001a114b3cbab5d601053d074693
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex">no, but if you run tin in deb=
ug mode ("-D 1") the reason for trying to auth<br>
should show up in the log.<br></blockquote><div><br></div><div>Hi Urs!</div=
><div><br></div><div>This appears substantially similar to what I sent prev=
iously.</div><div><br></div><div>The message "nntp_open() authenticate=
()" corresponds with auth.c line 1432=C2=A0</div><div><br></div><div>.=
..and if I read it right it has decided to authenticate on the basis of:</d=
iv><div><br></div><div>=C2=A0if (force_auth_on_conn_open ||=C2=A0</div><div=
>=C2=A0(nntp_caps.type =3D=3D CAPABILITIES &&=C2=A0</div><div>=C2=
=A0 =C2=A0!nntp_caps.reader &&=C2=A0</div><div>=C2=A0 =C2=A0(nntp_c=
aps.authinfo_user || (nntp_caps.authinfo_sasl & SASL_PLAIN))))<br></div=
><div><br></div><div>Adding some extra debug statements shows that this exp=
ression evaluates to True because all of:</div><div><br></div><div>* nntp_c=
aps.type =3D=3D CAPABILITIES<br></div><div>* !nntp_caps.reader=C2=A0<br></d=
iv><div>* nntp_caps.authinfo_user</div><div><br></div><div>...are true (and=
the other expressions are false) but I don't follow why this tuple of =
booleans should require Tin to authenticate?</div><div><br></div><div>There=
is a comment in the code:</div><div><br></div><div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0* If the user wants us to authenticate on connection start=
up, do it now.<br></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Some news =
servers return "201 no posting" first, but after successful</div>=
<div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* authentication you get a "200=
posting allowed". To find out if we are</div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0* allowed to post after authentication issue a "MODE =
READER" again and</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* interp=
ret the response code.</div></div><div><br></div><div>...but again this see=
ms not relevant to the situation?</div><div><br></div><div>I am wondering w=
hether this is a bug/not commonly encountered case, because I am connecting=
to INN from an IP which also _feeds_ the server, so article Feeding requir=
es Auth but article Reading/Posting does not?=C2=A0</div><div><br></div><di=
v>That might line up because, Gnus, etc, all do MODE READER and _then_ chec=
k whether they need to authenticate - which, in this case, they do not.</di=
v><div><br></div><div>=C2=A0 =C2=A0 -a</div><div><br></div><div><br></div><=
div><br></div><div><div>nntp_open() BEGIN</div><div>nntp_open() usenet:119<=
/div><div><<< [16:22:36.471330] 200=C2=A0usenet=C2=A0InterNetNews =
server INN 2.6.0 ready (transit mode)</div><div>nntp_open()=C2=A0usenet=C2=
=A0InterNetNews server INN 2.6.0 ready (transit mode)</div><div>new_nntp_co=
mmand(CAPABILITIES)</div><div>>>> [16:22:36.472123] CAPABILITIES</=
div><div><<< [16:22:36.664325] 101 Capability list:</div><div>new_=
nntp_command(CAPABILITIES) OK</div><div><<< [16:22:36.690737] VERS=
ION 2</div><div><<< [16:22:36.690945] IMPLEMENTATION INN 2.6.0</di=
v><div><<< [16:22:36.691058] AUTHINFO USER</div><div><<< =
[16:22:36.691162] MODE-READER</div><div>nntp_open() authenticate()</div><di=
v>nntp_open() MODE READER</div><div>>>> [16:22:36.691528] MODE REA=
DER</div><div><<< [16:22:37.959359] 200=C2=A0usenet=C2=A0InterNetN=
ews NNRP server INN 2.6.0 ready (posting ok)</div><div>new_nntp_command(CAP=
ABILITIES)</div><div>>>> [16:22:37.960847] CAPABILITIES</div><div>=
<<< [16:22:38.092218] 101 Capability list:</div><div>new_nntp_comm=
and(CAPABILITIES) OK</div><div><<< [16:22:38.119069] VERSION 2</di=
v><div><<< [16:22:38.119294] IMPLEMENTATION INN 2.6.0</div><div>&l=
t;<< [16:22:38.145393] AUTHINFO SASL</div><div><<< [16:22:38=
.145623] HDR</div><div><<< [16:22:38.145822] LIST ACTIVE ACTIVE.TI=
MES COUNTS DISTRIB.PATS DISTRIBUTIONS HEADERS MODERATORS MOTD NEWSGROUPS OV=
ERVIEW.FMT SUBSCRIPTIONS</div><div><<< [16:22:38.145961] OVER</div=
><div><<< [16:22:38.146076] POST</div><div><<< [16:22:38.=
146204] READER</div><div><<< [16:22:38.146329] SASL DIGEST-MD5 NTL=
M CRAM-MD5</div><div><<< [16:22:38.146462] STARTTLS</div><div>auth=
orization failed</div><div>nntp_close() END</div><div>nntp_command(QUIT)</d=
iv><div>>>> [16:22:41.994303] QUIT</div><div><<< [16:22:4=
2.128402] 205 Bye!</div><div>nntp_command(QUIT) OK</div></div><div><br></di=
v><div><br></div><div><br></div><div><br></div><div>=C2=A0</div></div>-- <b=
r><div class=3D"gmail_signature"><a href=3D"http://dropsafe.crypticide.com/=
aboutalecm" target=3D"_blank">http://dropsafe.crypticide.com/aboutalecm</a>=
<br></div>
</div></div>
--001a114b3cbab5d601053d074693--
--===============4459304973361215222==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KdGluLXVzZXJz
IG1haWxpbmcgbGlzdAp0aW4tdXNlcnNAdGluLm9yZwpodHRwOi8vbGlzdHMudGluLm9yZy9jZ2kt
YmluL21haWxtYW4vbGlzdGluZm8vdGluLXVzZXJzCg==
--===============4459304973361215222==--