Subject: bug#6953: 24.0.50; serious security bug in create backup files

From: Stefan Monnier <[email-masked]>
Date: Thu, 09 Sep 2010 19:09:47 +0200

>> The time window during which the access rights are too loose.
> Do you mean changing Fcopy_file to optionally not copy the source file
> permission bits to the output file?

Something like that.

> Maybe that's better, but it would need yet another optional argument
> for copy-file, which would probably not see much use outside of
> this context.

Adding yet-another-arg doesn't sound very appealing, indeed.
Maybe a better solution is to split copy-file into 2 functions: one that
copies the file data (into a file that's only readable by the current
process, or user) and another that copies various parts of its metadata
like timestamp, uid-gid, ... (this last function might be itself split
into various parts).  So copy-file can be implemented on top of those
functions and backup can use them as well.

        Stefan