diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-01-13 09:45:18 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-01-13 09:45:18 +0000 |
commit | 4bcdec727623c4f1775ba8fceb69a83b021657e1 (patch) | |
tree | 040eb6b0df41bbf6a27cc8b24c90ced5fc0813a2 | |
parent | 4aab0ed8287a4f1323c600f0224c96d9eb383cac (diff) | |
download | cygnal-4bcdec727623c4f1775ba8fceb69a83b021657e1.tar.gz cygnal-4bcdec727623c4f1775ba8fceb69a83b021657e1.tar.bz2 cygnal-4bcdec727623c4f1775ba8fceb69a83b021657e1.zip |
* syscalls.cc (rename): Don't exit prematurely with EROFS when trying
to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL
socket.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 02a0659a7..31601182c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2010-01-13 Corinna Vinschen <corinna@vinschen.de> + + * syscalls.cc (rename): Don't exit prematurely with EROFS when trying + to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL + socket. + 2010-01-12 Corinna Vinschen <corinna@vinschen.de> * globals.cc (ro_u_nwfs): New R/O unicode string. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 5cc59e682..ec589712a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1765,7 +1765,7 @@ rename (const char *oldpath, const char *newpath) set_errno (ENOENT); goto out; } - if (oldpc.isspecial ()) /* No renames from virtual FS */ + if (oldpc.isspecial () && !oldpc.issocket ()) /* No renames from virtual FS */ { set_errno (EROFS); goto out; @@ -1814,7 +1814,7 @@ rename (const char *oldpath, const char *newpath) set_errno (newpc.error); goto out; } - if (newpc.isspecial ()) /* No renames to virtual FSes */ + if (newpc.isspecial () && !newpc.issocket ()) /* No renames to virtual FSes */ { set_errno (EROFS); goto out; |