summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-10-21 17:43:00 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-10-21 17:43:00 +0000
commit22e671336e8db5fe4f026d1c0c8eb98b4e7d728f (patch)
tree6036e9ffe166f5fe287230ba2638f7e86d6a644d
parent2cd3283c8f3dda71b396c8921a8d23add968048f (diff)
downloadcygnal-22e671336e8db5fe4f026d1c0c8eb98b4e7d728f.tar.gz
cygnal-22e671336e8db5fe4f026d1c0c8eb98b4e7d728f.tar.bz2
cygnal-22e671336e8db5fe4f026d1c0c8eb98b4e7d728f.zip
* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Check invalid
success only on Samba shares. * mount.cc (fs_info::update): Drop has_buggy_basic_info flag for NcFsd. * syscalls.cc (unlink_nt): Fix typo in comment.
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc3
-rw-r--r--winsup/cygwin/mount.cc4
-rw-r--r--winsup/cygwin/syscalls.cc2
4 files changed, 13 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 97dcccf72..e522fa494 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2011-10-21 Corinna Vinschen <corinna@vinschen.de>
+ * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Check invalid
+ success only on Samba shares.
+ * mount.cc (fs_info::update): Drop has_buggy_basic_info flag for
+ NcFsd.
+ * syscalls.cc (unlink_nt): Fix typo in comment.
+
+2011-10-21 Corinna Vinschen <corinna@vinschen.de>
+
* globals.cc (ro_u_ncfsd): New R/O unicode string.
* mount.cc (fs_info::update): Check for "NcFsd" FS. Set flags and
change comments accordingly.
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index d07cc93fb..e1ed4e18f 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1727,7 +1727,8 @@ fhandler_disk_file::rmdir ()
&fbi);
if (!NT_SUCCESS (status) && q_status == STATUS_OBJECT_NAME_NOT_FOUND)
status = STATUS_SUCCESS;
- else if (NT_SUCCESS (status) && NT_SUCCESS (q_status))
+ else if (pc.fs_is_samba ()
+ && NT_SUCCESS (status) && NT_SUCCESS (q_status))
status = STATUS_DIRECTORY_NOT_EMPTY;
}
if (!NT_SUCCESS (status))
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index a9accfad9..b0fe6ee8b 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -379,14 +379,14 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
Know example: EMC NS-702. We just don't use that info class on
any remote CIFS. */
has_buggy_fileid_dirinfo (is_cifs () || is_unixfs ());
- /* NWFS/NcFsd is known to have a broken FileBasicInformation info
+ /* NWFS is known to have a broken FileBasicInformation info
class. It can't be used to fetch information, only to set
information. Therefore, for NWFS we have to fallback to the
FileNetworkOpenInformation info class. Unfortunately we can't
use FileNetworkOpenInformation all the time since that fails on
other filesystems like NFS.
UNUSED, but keep in for information purposes. */
- has_buggy_basic_info (is_nwfs () || is_ncfsd ());
+ has_buggy_basic_info (is_nwfs ());
/* Netapp and NWFS/NcFsd are too dumb to allow non-DOS filenames
containing trailing dots and spaces when accessed from Windows
clients. We subsume CIFS into this class of filesystems right
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index d4aab4db5..faaa42a34 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -645,7 +645,7 @@ unlink_nt (path_conv &pc)
have to move it back. That's bad, because the directory would
be moved around which results in a temporary inconsistent state.
So, what we do here is to test if the directory is empty. If
- not, we bail out with ERROR_DIR_NOT_EMTPY. The below code
+ not, we bail out with STATUS_DIRECTORY_NOT_EMPTY. The below code
tests for at least three entries in the directory, ".", "..",
and another one. Three entries means, not empty. This doesn't
work for the root directory of a drive, but the root dir can