Article View: news.software.nntp
Article #79385Re: 200 or 201 at initial connection?
From: Russ Allbery
Date: Sun, 31 Aug 2008 01:09
Date: Sun, 31 Aug 2008 01:09
49 lines
2953 bytes
2953 bytes
Julien ΓLIE <iulius@nom-de-mon-site.com.invalid> writes:
> As for the implementation, it can soon become very difficult...
> Just a few examples:
>
> auth "users" {
> hosts: "*"
> auth: "ckpasswd -f /home/news/etc/users"
> }
>
> access "users" {
> newsgroups: "*"
> access: RPA
> }
>
> With an *empty* users file. The same goes for ldap, Kerberos...
> The server will send 200 whereas in fact the client will never
> be able to authenticate.
Yeah, this is the sort of thing I was thinking of when I had mentioned
cases where you don't know whether the user will be able to authenticate
or not. CAPABILITIES is much cleaner since it reflects the current
state. This is one of the reasons why relying on 200/201 is deprecated.
It turns out that 200 is the "safe" return; it never breaks anything, and
at most leads clients to attempt posts that won't be allowed. So nnrpd
currently always returns (or at least should always return) 200 unless it
knows for sure that posting will never be possible.
> May I assume it is useless to check such degenerated cases?
> Anyway, the first one cannot be checked.
> The second one, it can but I do not think it is worth doing that.
>
> Therefore, it is impossible to properly implement the right anwser codes.
Yup. Exactly.
> Can we just do the best we can with what the news administrator
> sets up? (implicitly assuming that for instance if post: is used,
> then at least one group exists in which the user will be able to post)
Yeah, I wouldn't spend a whole lot of time on getting it that accurate.
That's why CAPABILITIES is replacing it anyway.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<87fxomat3k.fsf@windlord.stanford.edu>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.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!news.stanford.edu!not-for-mailReferences:
<g971md$r4v$1@news.trigofacile.com> <877ia0k58u.fsf@windlord.stanford.edu> <g9cchr$b66$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <87fxomat3k.fsf@windlord.stanford.edu> Subject: Re: 200 or 201 at initial connection? Date: Sat, 30 Aug 2008 18:09:03 -0700 From: Russ Allbery <rra@stanford.edu> References: <g971md$r4v$1@news.trigofacile.com> <877ia0k58u.fsf@windlord.stanford.edu> <g9cchr$b66$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.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!news.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 49 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.stanford.edu 1220144943 29233 171.64.19.147 (31 Aug 2008 X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:LJcsFsTpPkQ2NcPXTX6SJlGRxkY=