Message163160
It's not that simple as we currently use public functions for copying the files and the metadata. copyfile is explicitly _not_ supposed to copy any metadata so we can't patch it up to do so. Also that won't help for other stat & xattr data so this fix would be rather incomplete.
umask is ruled out too, because that isn't (if I'm not mistaken) thread safe thus wouldn't help against stat & xattr disclosures anyway.
Therefore we'll have to re-implement the whole metadata "stack" for copy and copy2 using fd-based functions. Taking into account #4489, I guess it's the best way (+ hoping someone implements safe versions for other platforms too).
The mode itself can also be copied pretty easily using a custom opener for open (os.open has a mode argument).
I doubt I will be able to do that till beta1 though. But I suppose we can commit this while in the betas? |
|
Date |
User |
Action |
Args |
2012-06-19 13:17:11 | hynek | set | recipients:
+ hynek, loewis, pitrou, flox, radoslaw.zarzynski |
2012-06-19 13:17:11 | hynek | set | messageid: <1340111831.51.0.707148922755.issue15100@psf.upfronthosting.co.za> |
2012-06-19 13:17:10 | hynek | link | issue15100 messages |
2012-06-19 13:17:09 | hynek | create | |
|