home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sources / bugs / 344 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  3.6 KB

  1. Xref: sparky comp.sources.bugs:344 news.software.b:3890
  2. Path: sparky!uunet!ukma!gatech!rpi!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  3. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  4. Newsgroups: comp.sources.bugs,news.software.b
  5. Subject: Re: C-news unofficial patch: freeze news batches
  6. Message-ID: <1993Jan28.154903.3411@crd.ge.com>
  7. Date: 28 Jan 93 15:49:03 GMT
  8. References: <fYnlXJc@quack.sac.ca.us> <C1I4Mu.Hn7@zoo.toronto.edu> <1k77hr$a69@smurf.sub.org> <C1JJGx.Iwo@zoo.toronto.edu>
  9. Sender: usenet@crd.ge.com (Required for NNTP)
  10. Reply-To: davidsen@crd.ge.com (bill davidsen)
  11. Organization: GE Corporate R&D Center, Schenectady NY
  12. Lines: 59
  13. Nntp-Posting-Host: ariel.crd.ge.com
  14.  
  15. In article <C1JJGx.Iwo@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes:
  16. | In article <1k77hr$a69@smurf.sub.org> urlichs@smurf.sub.org (Matthias Urlichs) writes:
  17.  
  18. | >Either use the m! XYZZY header as a handy excuse to call programm XYZZY
  19. | >(if present in a special directory, for security reasons) with the rest
  20. | >of the file on its stdin, or tell your feed to send gzipped data to
  21. | >zrnews, compressed data to crnews, frozen data to frnews.
  22.  
  23. | I agree with the general sentiments, but think I have a slightly better
  24. | slant on how to tackle it.  It is indeed a botch to have the sender not
  25. | tell the receiver what compression method is being used.  It's almost
  26. | as bad a botch to cram this information in-line, which makes processing
  27. | the resulting transmission rather awkward (for example, you can't use
  28. | the standard decompression programs unless you first strip off that
  29. | stupid header somehow).  It's best to indicate compression method by
  30. | some out-of-band channel like Matthias's second method.
  31.  
  32.   I don't think the strip is a problem, as long as the line ends with
  33. newline you can do it with a shell script. Let me make sure I'm putting
  34. this clearly:
  35.   read comptype
  36.   twochar=`expr "$comptype" : "^\(..\).*"`
  37.   if [ twochar != "#!" ]; then BAILOUT_HERE; fi
  38.   uncomp=`expr "$comptype" : "^..\(.*\)"`
  39.   if [ ! -f /UNPACKDIR/$uncomp ]; then BAILOUT_HERE; fi
  40.   /UNPACKDIR/$uncomp | your_unbatch
  41.  
  42.   Note that I haven't stripped any args off the name, it can be done
  43. without too much trouble. I like this approach, because your
  44. BAILOUT_HERE procedure could store the file with header, so you can get
  45. a copy of the expandor needed, then drop the file back to rmail.
  46.  
  47. | There is a problem, however, with using different receiving programs
  48. | for different compression methods:  some old UUCP implementations have
  49. | the list of permissible remotely-run programs hardwired in, or otherwise
  50. | difficult to change, and often "rnews" is on the list but alternate
  51. | forms aren't.
  52.  
  53.   Very good point. And adding programs to the list for any site is
  54. somewhat a pain if you have entries for many systems in you Permissions
  55. file. It's not impossible, just a bit of a pain. The directory gives you
  56. the effect of an external table for lookup and control.
  57.  
  58. | Fortunately, there is a simple solution:  give the compression method as
  59. | an argument to rnews.  I can't see anything wrong with this, although I
  60. | need to sit down and sort out implementation details before I give it
  61. | the nod for sure.
  62.  
  63.   Since rnews still needs to do a lookup on the arg to see if it's
  64. supported, does this really save anything? And if the uncompressor needs
  65. arguments you have to handle multiple args to rnews. It can be done
  66. either way, but since embedding info at the start of the file is a
  67. tested technique for news, what's gained by changing?
  68.  
  69. -- 
  70. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  71.     A terible poker player can have a great hand,
  72.     A obnoxious fool can have a good idea.
  73.     Both are winners, regardless of who has them.
  74.