maybe a bug in copy files

Pavel Tsekov ptsekov at gmx.net
Mon Feb 26 18:38:37 UTC 2007


Hello,

On Mon, 26 Feb 2007, Egmont Koblinger wrote:

> 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.

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 ?



More information about the mc-devel mailing list