Jan Minář wrote: > mktemp(1) creates the file securely, with 0600 permissions. That's the > whole point. There is no race condition. That's the whole point.
Presuming the directory it's in is sticky or such so other users can't change it. I suppose it probably is on most systems, but I doubt it is on all... :-\ I expect the pipe suggestion that someone else offered would break on a whole bunch of systems, though. Ben. > On 7/18/08, Nikolai Weibull <[EMAIL PROTECTED]> wrote: >> On Fri, Jul 18, 2008 at 11:46, Bram Moolenaar <[EMAIL PROTECTED]> wrote: >> >>> Unfortunately the patch breaks configure for me: >>> 86: checking Python's configuration directory... >>> /usr/local/lib/python2.5/config >>> 87: usage: mktemp [-d] [-q] [-t prefix] [-u] template ... >>> 88: mktemp [-d] [-q] [-u] -t prefix >>> 89: Error: Can't create temporary file. Aborting. >>> >>> The BSD mktemp command requires a template or a "-t prefix" argument. I >>> don't know how portable it is, but this works for me: >>> >>> tmp_mkf="`mktemp /tmp/VcPmkXXXXXXXXXX`" >> And then we're back to the original problem, minus the easily >> guessable PID. If you want to solve it correctly, using pipes is a >> lot better. That way there's no chance of interception. Patch >> attached. >> > --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
