Re: sh-tmp-file inserts unsafe code

2005-10-13 Thread Kevin Rodgers
Sven Joachim wrote: Incidentally, the systems where it does _not_ work are all propietary, according to Reiner's message. That may be no coincidence... Incidentally, mktemp(1) is not a POSIX shell utility. -- Kevin Rodgers ___ Emacs-devel mailing

Re: sh-tmp-file inserts unsafe code

2005-10-12 Thread Sven Joachim
Richard M. Stallman wrote: Nobody HAS to use that obscure feature of sh-script mode. It's not _that_ obscure, it even has a menu entry. So it can use -t. If that doesn't work on your operating system, switch to GNU/Linux. Incidentally, the systems where it does _not_ work are all propietar

Re: sh-tmp-file inserts unsafe code

2005-10-12 Thread Richard M. Stallman
Nobody HAS to use that obscure feature of sh-script mode. So it can use -t. If that doesn't work on your operating system, switch to GNU/Linux. ___ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel

Re: sh-tmp-file inserts unsafe code

2005-10-12 Thread Sven Joachim
Reiner Steib wrote: $ mktemp -t foo.sh.XX /tmp/foo.sh.XX.KnRhKukl $ uname -a FreeBSD x86-freebsd1 4.11-RELEASE FreeBSD 4.11-RELEASE #0: [...] $ mktemp -t foo.sh.XX bash: mktemp: command not found $ uname -a SunOS sparc-solaris1 5.9 Generic_112233-03 sun4u sparc SUNW,Ultr

Re: sh-tmp-file inserts unsafe code

2005-10-11 Thread Richard M. Stallman
I installed this. Thanks. ___ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel

Re: sh-tmp-file inserts unsafe code

2005-10-11 Thread Reiner Steib
On Tue, Oct 11 2005, Sven Joachim wrote: > Emanuele Giaquinta wrote: >> In the FreeBSD implementation of mktemp the '-t' option has a slightly >> different meaning, it would be better to test it before. > > I don´t have FreeBSD, but looking at the manpage, the difference should > not matter. Anyb

Re: sh-tmp-file inserts unsafe code

2005-10-11 Thread Sven Joachim
Emanuele Giaquinta wrote: In the FreeBSD implementation of mktemp the '-t' option has a slightly different meaning, it would be better to test it before. I don´t have FreeBSD, but looking at the manpage, the difference should not matter. Anybody here to test it? _

Re: sh-tmp-file inserts unsafe code

2005-10-11 Thread Sven Joachim
Kevin Rodgers wrote: What about those of us on systems that do not provide mktemp(1)? I'm running ksh 93 on Solaris 9. You should install it from www.mktemp.org. Does Sun provide mktemp in Solaris 10? ___ Emacs-devel mailing list Emacs-devel@gn

Re: sh-tmp-file inserts unsafe code

2005-10-11 Thread Sven Joachim
Richard M. Stallman wrote: > I installed your changes, and tried extrapolating them to the other shells. > Thanks. Well, I wasn't lazy either. :-) Yesterday I installed the es and rc shells, read their manpages and worked out how they do command substitution. Both of them use the syntax

Re: sh-tmp-file inserts unsafe code

2005-10-10 Thread Richard M. Stallman
I installed your changes, and tried extrapolating them to the other shells. Thanks. ___ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel

Re: sh-tmp-file inserts unsafe code

2005-10-10 Thread Kevin Rodgers
Sven Joachim wrote: How about rewriting sh-tmp-file so that it uses mktemp(1) to create the temporary file? What about those of us on systems that do not provide mktemp(1)? I'm running ksh 93 on Solaris 9. -- Kevin Rodgers ___ Emacs-devel mailing

Re: sh-tmp-file inserts unsafe code

2005-10-10 Thread Reiner Steib
On Mon, Oct 10 2005, Emanuele Giaquinta wrote: > > "tmp = /tmp/" str ".$pid" \n > "fn sigexit { rm $tmp^* >[2]/dev/null }" \n) > (sh (file-name-nondirectory (buffer-file-name)) > ! > "TMP=`mktemp ${TMPDIR:-/tmp}/" str ".XX`" \n > "trap \"rm $TMP* 2>/dev/null\"

Re: sh-tmp-file inserts unsafe code

2005-10-10 Thread Emanuele Giaquinta
Here it is one for c?sh. *** sh-script.elWed Sep 21 13:02:55 2005 --- sh-script.elMon Oct 10 11:57:41 2005 *** *** 3392,3398 "Insert code to setup temporary file handling. See `sh-feature'." (bash sh-append ksh88) (csh (file-name-nondirectory (buffer-f

Re: sh-tmp-file inserts unsafe code

2005-10-10 Thread Sven Joachim
Richard M. Stallman wrote: How about rewriting sh-tmp-file so that it uses mktemp(1) to create the temporary file? Would you like to send a patch? Well, it will take me quite some time to even understand the code for this function. ;-) But if nobody else volunteers, I'll dig into it.

Re: sh-tmp-file inserts unsafe code

2005-10-09 Thread Richard M. Stallman
How about rewriting sh-tmp-file so that it uses mktemp(1) to create the temporary file? Would you like to send a patch? ___ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel

sh-tmp-file inserts unsafe code

2005-10-09 Thread Sven Joachim
The command `sh-tmp-file' (bound to `C-c C-t' in shell-script-mode) inserts code to setup temporary file handling based on the script's name and its pid at runtime. E.g., for foo.sh: TMP=${TMPDIR:-/tmp}/foo.sh.$$ trap "rm $TMP* 2>/dev/null" 0 Or for foo.csh: set tmp = /tmp/foo.csh.$$ onintr ex