🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82545

Re: NNRPD authentication issue

#82545
From: Julien ÉLIE
Date: Mon, 11 Jan 2010 20:43
66 lines
3920 bytes
Hi Daniel,

> Lets assume, a clients connects to the server. He will receive a 201
> greating with (no posting), reads some of the public groups and then
> might want to post a message. NNRPD responds to post with 440 instead of
> 480, allthough the latter would make the usenet client apply username
> and password.

Please note that if the user receives 201, then 440 is the right answer.
(I have not checked whether INN 2.4.5 sends 201 in your case -- if it sends
201, then it is a bug, and it has been fixed in INN 2.5.0, which now sends
the appropriate 200 greeting code.)

Anyway, the issue you report is real.  Thanks for your catch!
It is an historic bug in INN that even though 200 is reported, POST
can lead to 440 even though the user could have posted, had he
authenticated itself.

I somehow missed that part and only fixed IHAVE when reviewing INN
for RFC 4643.
I understand what happened:  I only checked the first return in every
function (doing authentication) and missed the fact that CMDpost()
consisted of both POST and IHAVE, handled separately.

It seems to be the only impacted NNTP command.  Now fixed in INN 2.5.2.

I think I will also make other changes to homogenize commands so that
they return 501 (syntax error) before 480 (authentication needed).
A few commands do that.  But not all of them.


> Is there a possibility to change the setup in readers.conf and make
> NNRPD reply with 480?

Unfortunately, it is not that easy.  The problem comes from the source
code and you would have to recompile INN.

Here is a patch for the 2.5 branch:

--- commands.c  (révision 8877)
+++ commands.c  (copie de travail)
@@ -616,7 +616,9 @@
     }
     if (!ihave && !PERMcanpost) {
        syslog(L_NOTICE, "%s noperm post without permission", Client.host);
-       Reply("%d Posting not allowed\r\n", NNTP_FAIL_POST_AUTH);
+       Reply("%d Posting not allowed\r\n",
+              PERMcanauthenticate && PERMcanpostgreeting ?
+              NNTP_FAIL_AUTH_NEEDED : NNTP_FAIL_POST_AUTH);
        return;
     }


I'm sorry to say that it cannot be easily backported to the 2.4 branch.
Of course it can, but it would require to patch much more the code so
as to add the variables PERMcanauthenticate and PERMcanpostgreeting
that are not defined in the 2.4 branch...  They were added to fully
comply with RFC 3977.

-- 
Julien ÉLIE

« Cela n'a rien de remarquable. Il suffit d'appuyer
  sur la bonne touche au bon moment et l'instrument
  joue tout seul. » (J.-S. Bach) 
Technical Details
Message-ID: <hig2hs$n79$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-151-1-8-94.w83-114.abo.wanadoo.fr!not-for-mail
References: <hifqvt$bvn$1@solani.org> <803a2c8o6e.fsf@banana.shacknet.nu> <hiftcp$gg3$1@solani.org>

Show Full Headers
Complete Article Headers
Message-ID: <hig2hs$n79$1@news.trigofacile.com>
Subject: Re: NNRPD authentication issue
Date: Mon, 11 Jan 2010 21:43:42 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <hifqvt$bvn$1@solani.org> <803a2c8o6e.fsf@banana.shacknet.nu> <hiftcp$gg3$1@solani.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-151-1-8-94.w83-114.abo.wanadoo.fr!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 66
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Jan 2010 20:43:40 +0000 (UTC)
Injection-Info: news.trigofacile.com;
 posting-host="aaubervilliers-151-1-8-94.w83-114.abo.wanadoo.fr:83.114.7.94";
 logging-data="23785"; mail-complaints-to="abuse@trigofacile.com"
In-Reply-To: <hiftcp$gg3$1@solani.org>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6002.18005
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005