Re: [1.7] rename/renameat error

2009-09-30 Thread Corinna Vinschen
On Sep 29 20:10, Eric Blake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to Corinna Vinschen on 9/29/2009 1:35 PM: > > On Sep 29 13:18, Eric Blake wrote: > >> I missed one corner case in my testing; how about this followup? > >> > >> 2009-09-29 Eric Blake > >> > >>

detect . in a/.//

2009-09-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My testing on rename found another corner case: we rejected rename("dir","a/./") but accepted rename("dir","a/.//"). OK to commit? For reference, the test I am writing for hammering rename() and renameat() corner cases is currently visible here; it w

Re: detect . in a/.//

2009-09-30 Thread Christopher Faylor
On Wed, Sep 30, 2009 at 06:07:29AM -0600, Eric Blake wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >My testing on rename found another corner case: we rejected >rename("dir","a/./") but accepted rename("dir","a/.//"). OK to commit? > >For reference, the test I am writing for hammering r

Re: detect . in a/.//

2009-09-30 Thread Christopher Faylor
On Wed, Sep 30, 2009 at 11:24:38AM -0400, Christopher Faylor wrote: >On Wed, Sep 30, 2009 at 06:07:29AM -0600, Eric Blake wrote: >>-BEGIN PGP SIGNED MESSAGE- >>Hash: SHA1 >> >>My testing on rename found another corner case: we rejected >>rename("dir","a/./") but accepted rename("dir","a/.//

Re: detect . in a/.//

2009-09-30 Thread Corinna Vinschen
On Sep 30 11:24, Christopher Faylor wrote: > On Wed, Sep 30, 2009 at 06:07:29AM -0600, Eric Blake wrote: > >-BEGIN PGP SIGNED MESSAGE- > >Hash: SHA1 > > > >My testing on rename found another corner case: we rejected > >rename("dir","a/./") but accepted rename("dir","a/.//"). OK to commit?

Re: detect . in a/.//

2009-09-30 Thread Corinna Vinschen
On Sep 30 11:34, Christopher Faylor wrote: > bool > has_dot_last_component (const char *dir, bool test_dot_dot) > { > /* SUSv3: . and .. are not allowed as last components in various system > calls. Don't test for backslash path separator since that's a Win32 > path following Win32 rul

Re: detect . in a/.//

2009-09-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Christopher Faylor on 9/30/2009 9:34 AM: >> Is this function supposed to detect just "." or "*/."? Both. > /* SUSv3: . and .. are not allowed as last components in various system > calls. Don't test for backslash path separator s

Re: detect . in a/.//

2009-09-30 Thread Christopher Faylor
On Wed, Sep 30, 2009 at 01:04:04PM -0600, Eric Blake wrote: >According to Christopher Faylor on 9/30/2009 9:34 AM: >>> Is this function supposed to detect just "." or "*/."? > >Both. > >> /* SUSv3: . and .. are not allowed as last components in various system >> calls. Don't test for backsl