romain@pyrnj.UUCP (05/03/86)
By no means has this been thoroughly tested. It may not have desired effect. Also, I don't think expire can delete spurious articles if you rebuild it with this patch. vnews and readnews should skip over bad articles, though, and rnews should refuse to install the articles in the first place. I'm not a news hacker! *** header.c.ORG Fri Jun 7 00:15:59 1985 --- header.c Fri May 2 22:39:58 1986 *************** *** 79,85 return NULL; #endif /* OLD */ ! strip: /* strip off sys! from front of path. */ if (strncmp(FULLSYSNAME, hp->path, (len = strlen(FULLSYSNAME))) == 0 && index(NETCHRS, hp->path[len])) (void) strcpy(hp->path, &(hp->path[len+1])); --- 79,90 ----- return NULL; #endif /* OLD */ ! strip: ! /* romain -- kill bad articles */ ! if (checkid(hp->ident) == -1) ! return NULL; ! ! /* strip off sys! from front of path. */ if (strncmp(FULLSYSNAME, hp->path, (len = strlen(FULLSYSNAME))) == 0 && index(NETCHRS, hp->path[len])) (void) strcpy(hp->path, &(hp->path[len+1])); *************** *** 768,771 if (c != EOF) (void) ungetc(c, fp); /* push back first char of next header */ return buf; } --- 773,793 ----- if (c != EOF) (void) ungetc(c, fp); /* push back first char of next header */ return buf; + } + + /* + * to combat Unknown@hplabs.UUCP + */ + checkid(ident) + char *ident; + { + register char *cp; + register gotid = 0; + + for (cp = ident; *cp; cp++) { + if (gotid) /* Yet more ID's??? */ + return (-1); + if (*cp == '>') gotid = 1; + } + return (0); } -- Romain Kang, Pyramid Technology Corporation US Mail: 10 Woodbridge Center Drive, Woodbridge, NJ 07095 Ma Bell: (201) 750-2626 UUCPnet: {allegra,cmcl2,pyramid,topaz}!pyrnj!romain "Eggheads unite! You have nothing to lose but your yolks!" -Adlai Stevenson