emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sh-tmp-file inserts unsafe code


From: Sven Joachim
Subject: Re: sh-tmp-file inserts unsafe code
Date: Wed, 12 Oct 2005 18:19:22 +0200
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051001)

Reiner Steib wrote:

$ mktemp -t foo.sh.XXXXXXXXXX
/tmp/foo.sh.XXXXXXXXXX.KnRhKukl
$ uname -a
FreeBSD x86-freebsd1 4.11-RELEASE FreeBSD 4.11-RELEASE #0: [...]

$ mktemp -t foo.sh.XXXXXXXXXX
bash: mktemp: command not found
$ uname -a
SunOS sparc-solaris1 5.9 Generic_112233-03 sun4u sparc SUNW,Ultra-60

$ mktemp -t foo.sh.XXXXXXXXXX
/tmp/foo.sh.XXXXgHaO1t
$ uname -a
SunOS wega 5.10 Generic_118822-02 sun4u sparc SUNW,Ultra-Enterprise Solaris

$ mktemp -t foo.sh.XXXXXXXXXX
/tmp/foo.sh.J7Wmqo2lpy
$ uname -a
Darwin ppc-osx2.[...] 6.8 Darwin Kernel Version 6.8: [...]

HP-UX 10.20 also has maktemp, but doesn't support `-t':

,----[ mktemp(1) on HP-UX 10.20 ]
|  SYNOPSIS
|       mktemp [-c] [-d directory_name] [-p prefix]
`----

Thank you.  That's quite a mess indeed. :-(
It confirms that portable scripts best start with

#!/usr/bin/perl

;-)

Cheers, Sven.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]