Question on os.tempnam() vulnerability
grante at visi.com
Sat Jan 5 17:13:22 CET 2008
On 2008-01-05, Martin v. Löwis <martin at v.loewis.de> wrote:
>> I know. That's the point of my question: how do you do that
>> under Windows?
> When you create a new process, you have the option to inherit
> file handles to the new process. So the parent should open the
> file, and then inherit the handle to the new process.
That's an answer, though not for the question I asked. The
program that's being run requires a that it be passed a
filename on the command-line.
I'm not writing the program that is to open the file. If I
were, I'd just make it a python module and call it instead of
running it in a separate process.
> IOW, it's the same approach as on Unix.
Not really. Under Unix you can safely create a temp file with
a name that can be used to open the file. I asked about a way
to do that under Windows as well.
Grant Edwards grante Yow! ... I live in a
at FUR-LINE FALLOUT SHELTER
More information about the Python-list