Problem with notesfile/netnews inter - (nf)
spotter at tekcad.UUCP
spotter at tekcad.UUCP
Wed Dec 14 04:05:44 AEST 1983
#R:enea:-18400:tekcad:2700001:000:2218
tekcad!spotter Dec 13 10:05:00 1983
>I've a problem with the notefile system when it submits
>articles from notesfile to netnews with the routine newsoutput.
>The author is always set to "notes" (owner of notesfile)
>instead of the original author as it should, using B-news (2.10.1).
>Has anyone a fix for this?
Without DEMANDNEWS, when cron fires up the "su notesmo-
derator < cronrun", the notes for the day get sent out BUT
they get sent out with a PATH and a SENDER that list the
"real" user - notesmoderator. Then when someone responds
through mail from news, the response goes to
notesmoderator.The only way to avoid this is to use your own
inews that is allowed to believe the -f flag. I don't really
think that's a very good idea, since it would allow anyone
to send mail and pretend that it's from someone else.
With DEMANDNEWS, notes sends out each note as it gets
it - or at least that's the theory. What actually happens is
that any note that has been posted since the last dump - OR
AT THE SAME TIME AS THE LAST DUMP - is sent out. This means
that if the news dump takes less than a minute (that's the
resolution notes stores) then the note will go out again on
the next dump. It can't be fixed by insisting that the time
of the note be > the dump time because then if a user posts
2 notes in a minute the second one will not go out. The fix
I have implemented (and it seems to work) is to change the
resolution on times to 1 sec.
Another problem: bnewsinput hangs on some mal-formed inputs.
When given input that could be garbage you should never have things like:
while ((c = getc(rawnews)) != '\n');
I changed them all to things like:
while (((c = getc(rawnews)) != '\n') && (c != EOF));
if (c == EOF)
goto toobad;
Also, it looks like bnewsinput is looking for the date of notes/replies
generated by the notes system wrong. The lines read:
i = 0;
while ((line[i] = getc(rawnews)) != '\n');
/* grab date */
and should read:
i = 0;
while (((line[i++] = c = getc(rawnews)) != '\n') && (c != EOF));
^^ /* grab date */
if (c == EOF)
goto toobad;
This occurs in two places.
All these changes are available as ...!tekcad!~uucp/notes.tar
--
Steve Potter
CSnet: spotter at tek
ARPAnet: spotter.tek at rand-relay
uucp: {ucbvax,decvax,chico,pur-ee,cbosg,ihnss}!tektronix!tekcad!spotter
More information about the Comp.unix.wizards
mailing list