Re: [BUG] Inconsistent behaviour of rmdir

2000-11-20 Thread Guest section DW
On Mon, Nov 20, 2000 at 09:32:39AM +0100, Eric Paire wrote: > > > > On Fri, 17 Nov 2000, Guest section DW wrote: > > > > > I see that an entire discussion has taken place. Let me just remark this, > > > quoting the Austin draft: > > > > > > If the path argument refers to a path whose final comp

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-20 Thread Eric Paire
> > On Fri, 17 Nov 2000, Guest section DW wrote: > > > I see that an entire discussion has taken place. Let me just remark this, > > quoting the Austin draft: > > > > If the path argument refers to a path whose final component is either > > dot or dot-dot, rmdir( ) shall fail. > > > > EINVAL

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-17 Thread Alexander Viro
On 18 Nov 2000, Nix wrote: > Alexander Viro <[EMAIL PROTECTED]> writes: > > > If every way from foo to target goes through the source rename(source,target) > > _will_ make the graph disconnected. Checking that for generic DAG is a hell. > > Why do you say this? Algorithms for cycle detection

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-17 Thread Nix
Alexander Viro <[EMAIL PROTECTED]> writes: > If every way from foo to target goes through the source rename(source,target) > _will_ make the graph disconnected. Checking that for generic DAG is a hell. Why do you say this? Algorithms for cycle detection are comparatively computationally expensiv

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-17 Thread Alexander Viro
On Fri, 17 Nov 2000, Guest section DW wrote: > I see that an entire discussion has taken place. Let me just remark this, > quoting the Austin draft: > > If the path argument refers to a path whose final component is either > dot or dot-dot, rmdir( ) shall fail. > > EINVALThe path argu

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-17 Thread Guest section DW
On Thu, Nov 16, 2000 at 02:47:35PM +0100, Jean-Marc Saffroy wrote: > As you see, it looks like the rmdir fails simply because the dir name ends > with a dot !! This is confirmed by sys_rmdir in fs/namei.c, around line > 1384 : > > switch(nd.last_type) { > case LAST_DOTDOT

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Alexander Viro
On Thu, 16 Nov 2000, David Feuer wrote: > At 06:10 PM 11/16/2000 -0500, you wrote: > >Here's one more: you can't rename across the binding boundary. They _are_ > >mounts, so they avoid all that crap with loop creation on rename, etc. > >Take a generic DAG and try to implement rename() analog on

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread David Feuer
At 06:10 PM 11/16/2000 -0500, you wrote: >Here's one more: you can't rename across the binding boundary. They _are_ >mounts, so they avoid all that crap with loop creation on rename, etc. >Take a generic DAG and try to implement rename() analog on it. Have fun >catching the cases that would make t

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Alexander Viro
On 16 Nov 2000, H. Peter Anvin wrote: [hardlinks on directories] > I don't believe it's inherently impossible in Linux anymore. In fact, Yes, it is. bindings are asymmetrical. And that's the reason why they work while links to directories do not. > vfsbinds provide a lot of the same kind o

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread H. Peter Anvin
Followup to: <[EMAIL PROTECTED]> By author:David Feuer <[EMAIL PROTECTED]> In newsgroup: linux.dev.kernel > > . and foo/. are also links, not directories... the directories themselves > are filesystem internal objects, and not discussed by the standard. I > didn't know that linux supporte

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread David Feuer
At 07:51 PM 11/16/2000 +0100, you wrote: >Now I see your point : by "." or "foo/." you mean the directory itself, >while "foo" or "foo/" refer to the link to the directory, and they are >obviously different objects... at least since hard links on directories >were introduced. Fine. . and foo/. ar

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Alexander Viro
On Thu, 16 Nov 2000, Jean-Marc Saffroy wrote: > Now I see your point : by "." or "foo/." you mean the directory itself, > while "foo" or "foo/" refer to the link to the directory, and they are > obviously different objects... at least since hard links on directories > were introduced. Fine. So

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Jean-Marc Saffroy
On Thu, 16 Nov 2000, Alexander Viro wrote: > > This is a point I don't understand here : do you mean that they are > > confused if they can rmdir "." but not if they can rmdir their cwd > > differently ? What's the difference ? > > rmdir() is _not_ "kill the directory identified by name and remo

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Alexander Viro
On Thu, 16 Nov 2000, Jean-Marc Saffroy wrote: > On Thu, 16 Nov 2000, Linus Torvalds wrote: > > > The cwd is not the problem. The '.' is. > > > > The reason for that check is that allowing "rmdir(".")" confuses a lot of > > UNIX programs, because it wasn't traditionally allowed. > > This is a

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Jean-Marc Saffroy
On Thu, 16 Nov 2000, Linus Torvalds wrote: > The cwd is not the problem. The '.' is. > > The reason for that check is that allowing "rmdir(".")" confuses a lot of > UNIX programs, because it wasn't traditionally allowed. This is a point I don't understand here : do you mean that they are confus

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Alexander Viro
On Thu, 16 Nov 2000, Linus Torvalds wrote: > The cwd is not the problem. The '.' is. > > The reason for that check is that allowing "rmdir(".")" confuses a lot of > UNIX programs, because it wasn't traditionally allowed. Moreover, allowing it means that you overload the semantics of rmdir() (

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Jesse Pollard
Jean-Marc Saffroy <[EMAIL PROTECTED]>: > > It looks like the rmdir syscall behaves strangely in 2.4 kernels : > > saffroy@sisley:~> uname -a > Linux sisley 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown > saffroy@sisley:/tmp> mkdir foo > saffroy@sisley:/tmp> rmdir foo/. > saffroy@

Re: [BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Linus Torvalds
On Thu, 16 Nov 2000, Jean-Marc Saffroy wrote: > > As you see, it looks like the rmdir fails simply because the dir name ends > with a dot !! This is confirmed by sys_rmdir in fs/namei.c, around line > 1384 : > > switch(nd.last_type) { > case LAST_DOTDOT: >

[BUG] Inconsistent behaviour of rmdir

2000-11-16 Thread Jean-Marc Saffroy
Hello, It looks like the rmdir syscall behaves strangely in 2.4 kernels : saffroy@sisley:~> uname -a Linux sisley 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown saffroy@sisley:/tmp> mkdir foo saffroy@sisley:/tmp> rmdir foo/. saffroy@sisley:/tmp> mkdir foo saffroy@sisley:/tmp> cd