detect . in a/.//

Eric Blake ebb9@byu.net
Wed Sep 30 12:07:00 GMT 2009


-----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 will be part of the next
coreutils release, among other places.  It currently stands at 400+ lines,
and exposes bugs in NetBSD, Solaris 10, mingw, and cygwin 1.5, but passes
on cygwin 1.7 (after this patch) and on Linux:
http://repo.or.cz/w/gnulib/ericb.git?a=blob;f=tests/test-rename.h

2009-09-30  Eric Blake  <ebb9@byu.net>

	* path.cc (has_dot_last_component): Detect "a/.//".

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrDSgEACgkQ84KuGfSFAYDIHACgqgrcRJ0E9NuYHTsZpgopyDY7
+YMAnj0pA/eQ1DbHPNPn4dpg4ddoem4p
=3WS7
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch28
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20090930/8a5576fa/attachment.ksh>


More information about the Cygwin-patches mailing list