[Python-Dev] Python 2.5.1

Calvin Spealman ironfroggy at gmail.com
Tue May 1 17:54:17 CEST 2007

On 5/1/07, Kristján Valur Jónsson <kristjan at ccpgames.com> wrote:
> Hm, I fail to see the importance of a special regression test for that
> peculiar file then with its special magical OS properties.  Why not focus
> our attention on real, user generated files?.

(Try to stick to the posting conventions and reply under the actual
segments you respond to.)

Not all the user generated files are directly from python. Consider
all the extension libraries that can do anything they want opening
files on lower levels. For example, database files are likely to have
different sharing flags than the default. I'm not sure if sqlite, for
example, may or may not have such problems.


Would tests that use ctypes do do the open directly be acceptable ways
of solving this?

> -----Original Message-----
> Wow, I'm very sorry, I didn't realize how much special pagefile.sys
> and hiberfil.sys are. As it turns out, even if you create a file with
> no sharing allowed, you can still open it with backup semantics in
> other processes, and thus can use GetFileAttributesEx, GetFileTime,
> etc. The file pagefile.sys seems almost magical then, I don't
> understand how it's opened to behave like that. The difference is also
> immediately visible if you try to open Properties of pagefile.sys, you
> won't even see Security tab there (even when I create file
> something.txt and then remove all ACLs, including SYSTEM, I can't
> access the file, but I can see Security tab and can grant myself
> permissions back), it looks like all kinds of opening that file are
> denied. Maybe this is a special security feature, so that no process
> could access swapped pages (otherwise it could be possible with backup
> semantics). Thus you can't access the file itself, you can only access
> containing directory.
> > So I guess we need continue using pagefile.sys as a test case.
> Seems to be true, it's just maybe it shouldn't be hardcoded to C:\
> There's REG_MULTI_SZ PagingFiles in
> "HKLM\System\CurrentControlSet\Control\Session Manager\Memory
> Management", btw. The format seems to be "filename minmbsize
> maxmbsize" for every line.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ironfroggy%40gmail.com

Read my blog! I depend on your acceptance of my opinion! I am interesting!

More information about the Python-Dev mailing list