Andreas Jaeger <aj(a)suse.de> writes:
> 1. Take an rcs2log from a recent CVS distribution (which
doesn't seem
> to have this problem).
Are you sure? I've just checked cvs-1.10.7 and it still has these
problems.
Oops.. I forgot that on the linux machine I was one we use the Redhat
CVS package. It uses mktemp too (which won't work on Solaris).
There are some writeups on how to do this portably. The debian folk
have one, I'l try finding it
[time passes]
I seem to have mistaken on the existence of write-ups.
The best portable solution seems to be..
umask 077
tmpdir=${TMPDIR-/tmp}/foo.$$
mkdir $tmpdir || exit 1
trap "rm -rf $tmpdir; exit" 0 1 2 3 15
but that is still insecure on some platforms...
Maybe we should simply ship mktemp?
AFAIK rcs2log comes from Emacs and Emacs is still the "master
source"
for cvs.
Maybe we should snarf the FSF 20.4 version in the same process at the
same time.
Jan