httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@nueva.pvt.k12.ca.us>
Subject Re: Good deed for the day?
Date Tue, 28 May 1996 02:25:04 GMT
On Mon, 27 May 1996, Brian Behlendorf wrote:

> On Sat, 18 May 1996 dirkx@elect6.jrc.it wrote:
> > A few suggestions:
> > 
> >  - Would it be an idea to put, by default *ON*, an 'Authorative'
> >    directive in each auth module; which ensures that if the module 
> >    cannot find the user, or if the password mismatches, etc for that
> >    module, an AUTH_REQUIRED is returned, unless the admin has
> >     specifically swithced off this authorative keyword.
> >  - Would it be an idea to make any problem with the access checking or
> >    inconsistencies, missing informaion,e tc, such as not being able to open
> >     afile in the gdb, etc  lead to a SERVER_ERROR
> >   - I.e. be really hesitant to give a DECLINE.
> 
> This all sounds right.  Also sounds like the time might be right for a 
> "guide to module writers", since writing a good module is more than just 
> coding to the API.

This is a good point. And as it happens, an auth module should *not*
be hesitant to give return DECLINED, it should do so at every
opportunity. The reason for this is that if, for example, the DBM
module can't find a user, or the password doesn't match, maybe the
regular auth module knows something about it, and so it passes it
on. You'll note that mod_auth almost never DECLINEs.

[snip]

> Hmm, given the action in mod_info I'd say the latter is preferred, but I 
> think either can be derived from the other, so I'm not sure it matters a 
> whole lot.

Actually, it does, IMO. Where those things are used are, for example,
when you have illegal syntax, like 

AddType foo

which will get you, when you start Apache:

Syntax error on line 1 of ../conf/srm.conf:
AddType requires at least two arguments, a mime type followed by one
or more file extensions

The command_rec entry for AddType is:

{ "AddType", add_type, NULL, OR_FILEINFO, ITERATE2,
    "a mime type followed by one or more file extensions" },

Apache adds the "AddType requires at least two arguments," all by
itself. That's why the error strings are all (or should be) sentance
fragments and tend not to be gramatically correct on their own. It's
not the place to put a whole sentance, just a noun.

-- 
________________________________________________________________________
Alexei Kosut <akosut@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/
 
      "War does not determine who is right, only who is left."


Mime
View raw message