home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2032 / rnews.readme < prev    next >
Encoding:
Text File  |  1990-12-28  |  3.2 KB  |  70 lines

  1. /*
  2.  
  3. JZ rnews.c V1.4 for C news 
  4.  
  5. C News has a fair amount of overhead in all the processes that get run 
  6. between rnews and relaynews.  This program eliminates most of this 
  7. overhead for a substantial performance increase.  I measure ~40% on my 
  8. tests with 200k before compression batches.  Performance improvement 
  9. will be higher on smaller batches or with uncompressed feeds.  
  10. Basically, things go right from rnews into relaynews. 
  11.  
  12. Much of this overhead is concerned with disk space.  IMHO, there are 
  13. better ways of doing disk space managment than C New's limited method 
  14. of not unpacking news if the disk is full.  If news is continuing to 
  15. come in, one is just delaying the inevitable (throwing away news) 
  16. anyway.  There are other, more effective ways to take care of disk 
  17. space; a progressive expire (see below) and a uucp that is smart 
  18. enough to quit accepting incoming news when space is low and possibly 
  19. understands a temporary failure return code.  
  20.  
  21. This rnews has an option to do progressive expires if there is not 
  22. enough space on the spool partition.  The advantage of this is that 
  23. you can run right on the edge of a full disk without ever worrying 
  24. about losing news or trying to estimate how much will come in before 
  25. you run expire again.  These are "expire -r"s; they run reasonably 
  26. fast.  If expire tends to slow your system down excessively, you may 
  27. want to consider adding a sleep() to expire to make the system more
  28. usable while expire is running.  A cnews example (expire.c):
  29.  
  30.         while ((line = readline(old)) != NULL) {
  31. >                unsigned int slowdown=0;  
  32. >                if (++slowdown % 50 == 0) sleep(1);  
  33.                 line = doline(line);
  34.  
  35. Note that you should still run expire from cron now and then to 
  36. rebuild the history file (use dbz).  Be sure to create the
  37. /usr/lib/news/explist.[A-E] files.
  38.  
  39. C News makes some attempts to address local news security but leaves 
  40. some holes (newsspool and relaynews) that make some of this a wasted 
  41. effort.  You don't ever want a user directly or indirectly running a 
  42. news owned program while their uid is exposed.  There is little sense 
  43. in using another id (such as news) if breaking that id (or purposely 
  44. giving the passwd so someone can administer news) allows one to 
  45. break many others by a trojan horse attack.  This program runs suid 
  46. root and immediately gives it up.  It cures the problem of a uid being 
  47. exposed through the rnews/newsspool entry point.  If you install the 
  48. supplied relaynews.c the other entry point (inews/relaynews) will be 
  49. secure from this attack.  You can get rid of setnewsids and change 
  50. newsspool and relaynews.real permissions and ownership to be like the 
  51. other files.  
  52.  
  53. This program should be in a public bin directory and:
  54.  
  55.  -rws--x--x  root  bin    rnews
  56.  
  57. Tested on SUNOS 4.0, Sys III (a 16 bit machine), and a Sys V.3.1 system. 
  58.  
  59. Copyright 1989 Jon Zeeff <zeeff@b-tech.ann-arbor.mi.us>
  60.  
  61. You can do whatever you want with this code provided you:
  62.  
  63. 1) leave my name on it
  64. 2) don't hold me responsible for any problems  
  65. 3) report all bugs and modifications to me via email 
  66.  
  67. Support for c7decode added by Uwe Doering <gemini@netmbx.UUCP>
  68. I used the original Cnews c7decode.c with slight modifications.
  69. */
  70.