[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KDE linuxisms may confuse CIFS and will cause trouble on Windows
From:       "Jaison Lee" <lee.jaison () gmail ! com>
Date:       2007-01-04 21:47:24
Message-ID: 2d720bd30701041347u7c32f84bw90c6d753dd1715b5 () mail ! gmail ! com
[Download RAW message or body]

> Until now, removing an open file was a legal thing to do. In fact, not
> only was it quite common, it was even the recommended practice in some
> circumstances.
>
> I don't think you can remove an open file on Windows. Thus, you can't
> rename something to an open file.
>
> Each case where this happens has to be analysed: is the renaming
> intentional or accidental? If it's accidental, it's a bug. If it was
> intentional, we have to find a solution for Windows -- which hopefully
> will work on the Unixes as well.

Wow. That sucks. This is like a standard practice on Linux. A lot of
code uses (Q/K)TemporaryFile to generate a name and then passes that
filename to someplace else. Not a problem so long as the original
handle stays open until the new file is created. If you remove the
temporary file and then create a new file afterwards it leaves a
window open whereby (I believe) certain security attacks can be made.
Everything just gets messy.

Someone correct me if I'm wrong, but I really thought that python uses
this method to create invisible temporary files, even on Windows.
Unfortunately I don't have a Windows box handy, but someone may want
to look into how tempfile.TemporaryFile() works in the windows version
of python.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic