[1.7] rename/renameat error

Eric Blake ebb9@byu.net
Fri Sep 25 03:32:00 GMT 2009


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

According to Christopher Faylor on 9/23/2009 10:41 AM:
>> Also less risky would be to make changes locally in mkdir, link, and
>> rename for now.

Done - this patch narrows the scope of the changes to just the interfaces
in question.  I've also tested that it made it through the coreutils
testsuite without any regressions.

> 
> I'm not clear if this is a regression or not.  If it isn't a regression,
> I'd opt for leaving it until 1.7.2.

Now that I'm not touching path.cc, these are all much more self-contained,
and make cygwin more consistent with Linux.  For example:

touch a
ln -s c b
link a b/

should fail because b/ is not an existing directory, but without this
patch, it succeeds and creates the regular file c as a link to a.

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

	* syscalls.cc (link): Delete obsolete comment.  Reject directories
	and missing source up front.
	(rename): Use correct errno for trailing '.'.  Allow trailing
	slash to newpath iff oldpath is directory.
	* dir.cc (mkdir): Reject dangling symlink with trailing slash.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Reject
	trailing slash.
	* fhandler.cc (fhandler_base::link): Match Linux errno.

- --
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/

iEYEARECAAYFAkq8OaEACgkQ84KuGfSFAYAiLACghYLCFaIGmFR4AuzKAmBuQcg/
kFoAoJcX+ufE6YUq7S1AeVRvHtyZ30wc
=4otJ
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch21
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20090925/c40d9c16/attachment.ksh>


More information about the Cygwin-patches mailing list