Question on os.tempnam() vulnerability

"Martin v. Löwis" martin at v.loewis.de
Sat Jan 5 11:00:53 EST 2008


> 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.

The new process will need to know what the file handle it should
use. There are two basic options:
a) pass the file handle number as a string on the command line
b) make the handle either stdin or stdout of the new process,
   and have the new process ask for its stdin/stdout handle.

IOW, it's the same approach as on Unix.

Regards,
Martin



More information about the Python-list mailing list