readers.conf samples

Russ Allbery rra at
Mon Apr 10 07:53:51 UTC 2000

Brandon Hume <hume at Den.BOFH.Halifax.NS.Ca> writes:

> Some noteworthy (to me) things I ran across while putting this together:

> - The wildmat pattern is case sensitive.  The connecting hostname is
> lowercased before pattern matching, but the pattern itself is not.  So
> if I put "*.Dal.Ca" as my host: pattern, even though this is the manner
> in which it is actually nameserved, the hostname will be lowercased and
> fail to match.  INN 2.2.x doesn't appear to be like this.

I've just fixed this; thanks for the report!  Below is the patch that I'll

> - The default: in the auth realms is what links it to the "user" in the
> access realms.  I don't think this is true in all cases, though, and I
> haven't gone into the "key" keyword yet (I was intent on "MAKE IT GO!"
> at the time).

It's the best way to do it in general; see the documentation that I just
posted the other day.

> - Since I've used "host:" in every auth realm above, if, when a host
> connects, non-matching authentication realms will be thrown away WHILE
> nnrpd parses the readers.conf.  With the current perm.c source, when the
> parser returns, if not a single host pattern matched, I'll end up with
> an empty auth_realms array, which nnrpd doesn't check for, and nnrpd
> will segfault and die.

I believe that I fixed this the other day due to some help from another
person reporting this bug.

> A question of my own to the rest of the inn-workers... is anybody still
> working on the readers.conf code?

Yup!  I'd dearly like to unify the parsing code for files of this type
among all of the various programs in INN, and plan on working on this more
in the next few months.

> I've had the segfaulting-nnrpd problem for a while, and I can't find any
> mention of further work on the readers.conf code in the mailing list
> archives since August.  I've made changes in today's snapshot which
> cures the segfaults, at least for me, should I bother sending in a diff?

Whoops.  *wg*  Yeah, that would have been great.  Sorry about taking so
long to get back to this.

Index: perm.c
RCS file: /dist1/cvs/isc/inn/inn/nnrpd/perm.c,v
retrieving revision 1.16
diff -u -r1.16 perm.c
--- perm.c	2000/03/30 07:09:43	1.16
+++ perm.c	2000/04/10 07:52:14
@@ -547,7 +547,7 @@
     int oldtype;
     METHOD *m;
     BOOL bit;
-    char buff[SMBUF], *oldname;
+    char buff[SMBUF], *oldname, *p;
     oldtype = tok->type;
     oldname = tok->name;
@@ -572,6 +572,14 @@
 	curauth->hosts = COPY(tok->name);
+        /* nnrpd.c downcases the names of connecting hosts.  We should
+           therefore also downcase the wildmat patterns to make sure there
+           aren't any surprises.  DNS is case-insensitive. */
+        for (p = curauth->hosts; *p; p++)
+            if (CTYPE(isupper, (unsigned char) *p))
+                *p = tolower((unsigned char) *p);
       case PERMdefdomain:
 	curauth->default_domain = COPY(tok->name);

Russ Allbery (rra at             <>

More information about the inn-workers mailing list