Re: maybe a bug in copy files


On Mon, 26 Feb 2007, Egmont Koblinger wrote:

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

Here it is:

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.

Ok. Maybe we are talking about different issues. What I was talking
about was that the current code in MC requires the chmod() that i've
ressurected. From what I understand you was talking that if we change
the code we may avoid the chmod() call at the end. Is this right ?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]