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