Re: Making DO_POSIX_CP configurable

2007-09-12 Thread Denys Vlasenko
On Tuesday 11 September 2007 23:13, Alexander Kriegisch wrote: I am sending this answer to the list again, because it was my initial mistake that I sent the first copy of my last message to your address instead of to the list. Sorry, Denys, I was never talking about the scenario you are

Re: Making DO_POSIX_CP configurable

2007-09-12 Thread Alexander Kriegisch
I know, but it is not default behaviour, i.e. without manually changing the POSIX switch in the source code it will still unlink devices and recreate them as files. This affects all users negatively, independent of their wish to be POSIX-compliant. My tendency is to call this a bug, not some

Re: Making DO_POSIX_CP configurable

2007-09-11 Thread Denys Vlasenko
On Tuesday 11 September 2007 00:19, Alexander Kriegisch wrote: In SVN rev. #18119 [1] the default behaviour of 'cp' was changed by Denis in order to improve security and also to save a few bytes. This leads to problems in our application scenario here: We work on a mipsel-based router platform

Re: Making DO_POSIX_CP configurable

2007-09-11 Thread Alexander Kriegisch
Hi Denys! Thanks for introducing a special case for block/character devices. :) In a way, you did more than I requested, in another you did not, because DO_POSIX_CP still is not configurable the way I thought it was obviously inquired by me. But as so often, questions need to be asked more

Re: Making DO_POSIX_CP configurable

2007-09-11 Thread Denys Vlasenko
On Tuesday 11 September 2007 14:53, Ralf Friedl wrote: Hi Denys Can you point to real security problems from the use of cp with POSIX semantics? User comes to you and says I accidentally deleted my most important directory. I know that you make daily backups. Can you restore it from backup?

Re: Making DO_POSIX_CP configurable

2007-09-11 Thread Denys Vlasenko
On Tuesday 11 September 2007 12:34, Alexander Kriegisch wrote: Hi Denys! Thanks for introducing a special case for block/character devices. :) In a way, you did more than I requested, in another you did not, because DO_POSIX_CP still is not configurable the way I thought it was obviously

Making DO_POSIX_CP configurable

2007-09-11 Thread Ralf Friedl
User comes to you and says I accidentally deleted my most important directory. I know that you make daily backups. Can you restore it from backup? You do cp -a /backup/home/user/dir /home/user But user has crafted it so that backup contains dir/many_more_dirs/innocuous_file, and he also

Re: Making DO_POSIX_CP configurable

2007-09-11 Thread Denys Vlasenko
On Tuesday 11 September 2007 17:32, Ralf Friedl wrote: User comes to you and says I accidentally deleted my most important directory. I know that you make daily backups. Can you restore it from backup? You do cp -a /backup/home/user/dir /home/user But user has crafted it so that

Re: Making DO_POSIX_CP configurable

2007-09-11 Thread Alexander Kriegisch
I am sending this answer to the list again, because it was my initial mistake that I sent the first copy of my last message to your address instead of to the list. Sorry, Denys, I was never talking about the scenario you are mentioning, really just about overwriting an existing character device

Making DO_POSIX_CP configurable

2007-09-10 Thread Alexander Kriegisch
In SVN rev. #18119 [1] the default behaviour of 'cp' was changed by Denis in order to improve security and also to save a few bytes. This leads to problems in our application scenario here: We work on a mipsel-based router platform equipped with a TFFS (tiny flash filesystem) showing several files