FREQ code - little change

Pablo Saratxaga (
Sun, 3 Nov 1996 05:54:09 +0100 (MET)


I have, in config file:

public /var/spool/ifmail/freqs
magic /usr/lib/ifmail/magic

a magic file:
which contains the string "/pub/Linux/linuxbbs.50z"

and the true file under /var/spool/ifmail/freqs/pub/Linux/linuxbbs.50z

If someone requests "/pub/Linux/linuxbbs.50z", the code in ifcico, if
magic is defined, is to look for "linuxbbs.50z" under that directory,
in my case it exists, but it contains "/pub/Linux/linuxbbs.50z", which
is again matched agains a magic file... and an infinite loop is done.

I think that as long as someone request a name whith a path it is becasue he
_really_ wants it, and no magic matching should be done, so I made this
little change:

--- ifmail-2.8f/ifcico/respfreq.c Fri Jan 5 07:39:09 1996
+++ ifmail/ifcico/respfreq.c Sat Aug 17 04:33:46 1996
@@ -179,8 +179,7 @@
- if ((p=strrchr(nm,'/'))) p++;
- else p=nm;
+ p=nm;
if ((stat(tnm,&st) == 0) &&

(BTW, that also allow for directored magic files :) )


A bientôt, Pablo Saratxaga

~ ~ :wq ;-) PGP Key available, key ID: 0x8F0E4975