🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #49156

Re: INN 2.3.0 readers.conf question......

#49156
From: Russ Allbery
Date: Fri, 24 Nov 2000 00:00
21 lines
1658 bytes
Adam French <adamfre@nospamccrtc.com> writes:

> I think I see what you are saying.....  It would be difficult.  I could
> code something that just counted up to the limit, then denied all other
> requests, but for the script to determin when they loged out, that may
> be a toughie.

Doesn't the Perl authentication stuff have hooks for this?  Let me see....
Yup, authenticate is called on a disconnect.  So in auth_init, tie to an
external database (NDBM or Berkeley DB v1 would do just fine), and on a
connection, increment the count for that domain.  That should be easy
enough to do.  Deny access if they're over with a temporary failure, and
then when they disconnect, decrement the count for that domain.

You'll have to do some locking because of multiple nnrpd processes, but
simple fcntl locking should work.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <ylofz4k7ix.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <8vn139$a5l$1@nntp.ccrtc.com> <yl8zq8lwcv.fsf@windlord.stanford.edu> <8vn7gs$7in$1@nntp.ccrtc.com>

Show Full Headers
Complete Article Headers
Message-ID: <ylofz4k7ix.fsf@windlord.stanford.edu>
Subject: Re: INN 2.3.0 readers.conf question......
Date: Fri, 24 Nov 2000 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <8vn139$a5l$1@nntp.ccrtc.com> <yl8zq8lwcv.fsf@windlord.stanford.edu> <8vn7gs$7in$1@nntp.ccrtc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 697506730
Content-Type: text/plain; charset=us-ascii
Organization: The Eyrie
Mime-Version: 1.0
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)
Newsgroups: news.software.nntp