Re: Question on os.tempnam() vulnerability



On 2008-01-05, Martin v. Löwis <martin@xxxxxxxxxxx> 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
visi.com
.



Relevant Pages

  • Re: Calling FileStream.Create after File.Move gets old file handle
    ... I suspect this is the reason why file2 inherits the CreateDate from file1 ... And then windows (I believe. ... it will not inherit the meta data). ... the Closecall, so that when you come to open the second file, it ...
    (microsoft.public.dotnet.framework)
  • Re: Question on os.tempnam() vulnerability
    ... under Windows? ... When you create a new process, you have the option to inherit ... So the parent should open the ... it's the same approach as on Unix. ...
    (comp.lang.python)
  • Problem with Windows XP and Themes
    ... I have Windows XP Profession and Office XP 2003. ... the way that the controls look. ... chosen a theme other than Windows Classic, Access will inherit the theme ... Exceptions are reports (report: An Access database object that prints ...
    (microsoft.public.access.forms)
  • Re: Problem with Windows XP and Themes
    ... > I also have WindowBlinds V4 installed and this has a Windows XP Theme ... > changes the way that the controls look. ... > my forms to inherit this look. ... Exceptions are reports (report: An Access database ...
    (microsoft.public.access.forms)
  • Re: NTFS inherited permissions bug on W2K
    ... NTFS inherited permissions bug on W2K ... > bug in Windows Explorer. ... When you see the inherit permissions ... > identical or stronger than the permissions of the parent item. ...
    (NT-Bugtraq)