Package: cnews Version: cr.g7-37 Severity: critical Justification: causes serious data loss
I just stumbled upon this bug in newsrun, which has caused some lost newsbatches for me. Lets say you have multiple newsfeeds via UUCP, using different compression methods (e.g. compress and gzip). As incoming newsbatches are processed by rnews, they are given temporary filenames in /var/spool/news/in.coming, consisting of an timestamp and an suffix denoting the compression method. These suffixes are ".t" for "uncompressed", ".z" for "compressed using gzip", ".Z" for "compressed using compress" and so on. Two batches coming in at the same time (such as when polling multiple systems in parallel) and differing only in the compression method will thus get an filename differing only in the suffix, e.g. "12345678.z" and "12345678.Z" (note the case of the suffix). /usr/lib/news/input/newsrun is then run by cron and in a first stage decompresses all compressed newsbatches. This is done by the following lines of code (line 124 ff.): --------- by cutting here you might damage your screen surface --------- [...] # Decompress if necessary. case $f in *.Z) text=`echo $f | sed 's/Z\$/t/'` uncompress <$f >$text ;; *.z) text=`echo $f | sed 's/z\$/t/'` gzip -dc <$f >$text ;; [and so on] --------- by cutting here you might damage your screen surface --------- As one can see, an batch named "12345678.Z" is decompressed into "12345678.t". An batch named "12345678.z" is _also_ decompressed into "12345678.t". Depending on which one is picked up first, one of the two batches _will_ be lost irrevocabily. A possible solution would be to change the sed command to alter the timestamp also, amending a letter just before the suffix ".t". As no two compressed batches with the same timestamp and suffix will be created by rnews, this should be a reasonable safeguard. (This bug must have lingered in CNews for about a decade now. Is it really possible that I am the first person to stumble upon it?) Greetings from Telgte, =ToJe= -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i586) Kernel: Linux 2.4.29 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages cnews depends on: ii cron 3.0pl1-87 management of regular background p ii debconf [debconf-2.0] 1.4.47 Debian configuration management sy ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii perl 5.8.4-8 Larry Wall's Practical Extraction -- debconf information: cnews/mailname: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]