| Hmm, I think I agree with your assessment wrt security. These are hashed 
files after all and AFAIK darcs always checks that the hash matches the 
content.
That said, ending up with files not owned by yourself in your private 
cache or repositories can become a practical problem in case the other 
user removes our read permission.
Unfortunately this is not easy to fix because there is currently no 
portable way to check for file ownership. While the Win32 API does have 
a procedure for that, the result is an internal structure which is *not* 
part of the Win32 API, but rather belongs to kernel API (winnt.h), and 
the Haskell Win32 package does not yet expose the full API to get at the 
owner ID inside the structure (the naked foreign calls are in the 
sources but are not referenced anywhere). I guess similar problems will 
occur with getting the user ID of the current process.
This means that fixing this is going to require us to make a PR for 
Win32 to add the missing features. Then we need to define a portability 
layer for this, possibly contributing that to unix-compat (though I 
suspect this may be controversial since it would add considerable 
overhead to getFileStatus on Windows).
Sigh... |