maybe a bug in copy files

Egmont Koblinger egmont at uhulinux.hu
Mon Feb 26 17:57:03 UTC 2007


On Thu, Feb 22, 2007 at 05:44:39PM +0200, Pavel Tsekov wrote:

> Here it is:
> 
> http://mail.gnome.org/archives/mc-devel/2006-June/msg00063.html
> 
> Shall we discuss how to create the file in a secure manner
> and avoid the call to mc_chmod() ?

I think we're talking about two separate issues.

One is how to safely create a file (without race condition) so that we
really create _that_ file and not another one via a new symlink. The answer
is O_EXCL.

The other issue is how to create the file with the right permissions so that
we don't leak information. I guess I proposed a cleaner solution for this
than the current one.

I can't see any correlation between these two issues.


-- 
Egmont



More information about the mc-devel mailing list