🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82551

Re: NNRPD authentication issue

#82551
From: John F. Morse
Date: Tue, 12 Jan 2010 03:21
80 lines
4226 bytes
Julien ÉLIE wrote:
> 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.
>

Hi, Julien.

I had this issue with a user who used MicroPlanet Gravity. They could
eventually post but had to do some fancy footwork first.

IIRC, it failed to send mode reader, but it's been a couple of years
since I investigated this anomaly.

I don't have Gravity, but you might want to specifically verify that
Gravity will work after the patch.


-- 
John

When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Technical Details
Message-ID: <higpre$eui$1@optima5.xanadu-bbs.net>
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!feeder.news-service.com!feeder.news-service.com!nntp.club.cc.cmu.edu!optima2.xanadu-bbs.net!optima5.xanadu-bbs.net!not-for-mail
References: <hifqvt$bvn$1@solani.org> <803a2c8o6e.fsf@banana.shacknet.nu> <hiftcp$gg3$1@solani.org> <hig2hs$n79$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <higpre$eui$1@optima5.xanadu-bbs.net>
Subject: Re: NNRPD authentication issue
Date: Mon, 11 Jan 2010 21:21:18 -0600
From: "John F. Morse" <john@example.invalid>
References: <hifqvt$bvn$1@solani.org> <803a2c8o6e.fsf@banana.shacknet.nu> <hiftcp$gg3$1@solani.org> <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!feeder.news-service.com!feeder.news-service.com!nntp.club.cc.cmu.edu!optima2.xanadu-bbs.net!optima5.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 80
Reply-To: dont.bother
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: optima5.xanadu-bbs.net 1263266478 15314 192.168.89.210 (12 Jan 2010
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Tue, 12 Jan 2010 03:21:18 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
In-Reply-To: <hig2hs$n79$1@news.trigofacile.com>
X-Enigmail-Version: 0.96.0