Re: maybe a bug in copy files

2007-02-27 Thread Egmont Koblinger
On Mon, Feb 26, 2007 at 08:38:37PM +0200, Pavel Tsekov wrote: 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

Re: maybe a bug in copy files

2007-02-26 Thread Egmont Koblinger
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

Re: maybe a bug in copy files

2007-02-26 Thread Pavel Tsekov
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

Re: maybe a bug in copy files

2007-02-22 Thread Pavel Tsekov
Hello Lubomir, On Mon, 22 Jan 2007, Lubomir Grajciar wrote: When I try to copy file(s) with unchecked preserve atributes checkbox as regular user, copied files hasn't attributes based on my umask. My umask is: 0022 Copied file attributes: 600 When I try to create a new file (for example

Re: maybe a bug in copy files

2007-02-22 Thread Egmont Koblinger
Hi, [...] As it can be seen the patch posted by Andrew calls chmod() on the target file only if preserve attributes is set. However, it has to be called in both cases since the destination file is created with mode 600 initially due to security concerns - more info can be found in file.c .

Re: maybe a bug in copy files

2007-02-22 Thread Pavel Tsekov
Hello Egmont, On Thu, 22 Feb 2007, Egmont Koblinger wrote: Hi, [...] As it can be seen the patch posted by Andrew calls chmod() on the target file only if preserve attributes is set. However, it has to be called in both cases since the destination file is created with mode 600 initially

Re: maybe a bug in copy files

2007-02-22 Thread Pavel Tsekov
Hello, On Thu, 22 Feb 2007, Pavel Tsekov wrote: I remember that there is a discussion somewhere on the mailing list as to what this security concern is. I will try to dig it and see whether it really makes sense to do it the way it currently is. Here it is: