-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Samuel Thibault on 10/6/2009 6:12 PM:
> rename("dir2", "dir/.");
> 
> with dir/ existing, which is hanging
> 
> The obvious issue is that rename_dir is passed "." as toname and not the
> actual directory name, but since that's what the RPC asked, we have to
> cope with, but we don't and try to lock toname twice.  Since POSIX says
> “[EINVAL] ^[CX] The old pathname names an ancestor directory of the
> new pathname, or either pathname argument contains a final component
> that is dot or dot-dot.”, we could just refuse "." and ".." from
> diskfs_S_dir_rename with EINVAL?

Yes, that would be the proper fix - flat out refuse any argument with "."
or ".." as an explicit last component (whether or not there are trailing
"/" after the dot).  And in the meantime, that's how gnulib will work
around the problem, provided I can find a way to write an m4 test that
won't hang but will still expose the bug.

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

Eric Blake             e...@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/

iEYEARECAAYFAkrL43sACgkQ84KuGfSFAYBFrACfbhBftf0QoY3BjnphhUVuahyg
MgIAoM6Xb/UEjc81GrUdKFmMUUihQfHM
=qcz5
-----END PGP SIGNATURE-----


Reply via email to