* 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.
This commit is contained in:
Corinna Vinschen 2011-10-21 17:43:00 +00:00
parent 2cd3283c8f
commit 22e671336e
4 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,11 @@
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> 2011-10-21 Corinna Vinschen <corinna@vinschen.de>
* globals.cc (ro_u_ncfsd): New R/O unicode string. * globals.cc (ro_u_ncfsd): New R/O unicode string.

View File

@ -1727,7 +1727,8 @@ fhandler_disk_file::rmdir ()
&fbi); &fbi);
if (!NT_SUCCESS (status) && q_status == STATUS_OBJECT_NAME_NOT_FOUND) if (!NT_SUCCESS (status) && q_status == STATUS_OBJECT_NAME_NOT_FOUND)
status = STATUS_SUCCESS; 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; status = STATUS_DIRECTORY_NOT_EMPTY;
} }
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))

View File

@ -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 Know example: EMC NS-702. We just don't use that info class on
any remote CIFS. */ any remote CIFS. */
has_buggy_fileid_dirinfo (is_cifs () || is_unixfs ()); 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 class. It can't be used to fetch information, only to set
information. Therefore, for NWFS we have to fallback to the information. Therefore, for NWFS we have to fallback to the
FileNetworkOpenInformation info class. Unfortunately we can't FileNetworkOpenInformation info class. Unfortunately we can't
use FileNetworkOpenInformation all the time since that fails on use FileNetworkOpenInformation all the time since that fails on
other filesystems like NFS. other filesystems like NFS.
UNUSED, but keep in for information purposes. */ 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 /* Netapp and NWFS/NcFsd are too dumb to allow non-DOS filenames
containing trailing dots and spaces when accessed from Windows containing trailing dots and spaces when accessed from Windows
clients. We subsume CIFS into this class of filesystems right clients. We subsume CIFS into this class of filesystems right

View File

@ -645,7 +645,7 @@ unlink_nt (path_conv &pc)
have to move it back. That's bad, because the directory would have to move it back. That's bad, because the directory would
be moved around which results in a temporary inconsistent state. be moved around which results in a temporary inconsistent state.
So, what we do here is to test if the directory is empty. If 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, ".", "..", tests for at least three entries in the directory, ".", "..",
and another one. Three entries means, not empty. This doesn't and another one. Three entries means, not empty. This doesn't
work for the root directory of a drive, but the root dir can work for the root directory of a drive, but the root dir can