Patch for the integration of python hooks and readers.conf

Erik Klavon erik at
Mon Feb 3 18:31:51 UTC 2003


Ah, good question! Currently, the last *_access: statement wins. In
hook-python it says thou shalt not use perl_access and python_access
in the same auth block. It looks like that warning didn't make it into
hook-perl (patch below).

Taking a second look at the code, a memory leak is introduced
for multiple access statements in the same block. It would probably be
better to hard code this limitation and issue a suitable error
message. What should be the recovery from this error? Should we die or
just ignore all but the last *_access statement? 

(Though it would be possible to do so, I can't think of a good reason
to allow multiple *_access statements.)

The nearest case I can think of is the inclusion of a perl_* or
python_* statement when INN hasn't been compiled with the respective
interpreter. A ReportError happens in these cases.


--- hook-perl.pod       Mon Feb  3 10:00:58 2003
+++ new-hook-perl.pod   Mon Feb  3 10:10:43 2003
@@ -454,7 +454,9 @@
 A Perl script may be used to dynamically generate an access group
 which is then used to determine the access rights of the client. This
 occurs whenever the perl_access: is specified in an auth group which
-has successfully matched the client. 
+has successfully matched the client. Only one perl_access:
+statement is allowed in an auth group. This parameter should not be
+mixed with a python_access: statement in the same auth group.
 When a perl_access: parameter is encountered, Perl is loaded (if it
 has yet to be) and the file given as argument is loaded as

On Mon, Feb 03, 2003 at 12:31:06AM -0500, Jeffrey M. Vinocur wrote:
> On Sun, 2 Feb 2003, Erik Klavon wrote:
> > Enclosed are materials for the integration of the nnrpd python hooks
> > and readers.conf. 
> Erik, very nice work.
> One question -- what's the behavior when perl_access and python_access
> appear in the same group?
> -- 
> Jeffrey M. Vinocur
> jeff at

erik         | "It is idle to think that, by means of words, | Maurice
  kl at von     | any real communication can ever pass | Maeterlinck | from one [human] to another." | Silence

More information about the inn-workers mailing list