Subject: bin/13798: uudecode should support concatenated uuencoded files
To: None <gnats-bugs@gnats.netbsd.org>
From: None <anders@dinsen.net>
List: netbsd-bugs
Date: 08/28/2001 00:33:06
>Number: 13798
>Category: bin
>Synopsis: uudecode cannot handle concatenated uuencoded files
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 27 15:29:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Anders Dinsen
>Release: 1.5
>Organization:
Anders Dinsen
anders@dinsen.net
http://dinsen.net/anders/
>Environment:
System: NetBSD kvik 1.5 NetBSD 1.5 (KVIK) #4: Mon Jun 18 10:49:51 CEST 2001 anders@kvik:/amd/box/usr/src/sys/arch/i386/compile/KVIK i386
>Description:
It is sometimes desirable to concatenate many uuencoded files
into one (e.g. when saving them from a news reader).
uudecode will, however, only decode the first file and ignore
the rest.
>How-To-Repeat:
Concatenate two uuencoded files into one:
uuencode mysh < /bin/sh > shells.uue
uuencode mycsh < /bin/csh >> shells.uue
Then try to decode them (unpack):
uudecode shells.uue
Watch that only mysh is created.
>Fix:
Apply this patch to /usr/src/usr.bin/uudecode/uuencode.c which
introduces an ``-m'' option which tells uudecode to continue
searching for another file when a file has been decoded:
http://dinsen.net/netbsd/uudecode.c.diff (193 lines)
(Sorry, there is no patch for the man-page).
With that patch applied, the following command creates both
files in the above case:
uudecode -m shells.uue
Watch that both mysh and mycsh are created.
Naming the option ``-m'' may be a bad idea, since I see that
some other implementations of uuencode produces MIME encoded
files when that option is given. I just couldn't think of a
good alternative.
>Release-Note:
>Audit-Trail:
>Unformatted: