Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-01-24 20:29:42 +0300
committerCorinna Vinschen <corinna@vinschen.de>2008-01-24 20:29:42 +0300
commit08f2354b8f60a9cae88f530bb030655265575dd7 (patch)
tree9719e2340ea9313cb61a81b48d4ae279c45eb990
parente43f899fb7e10caa942c28b0d534add892d09482 (diff)
* path.cc (fs_info::update): Fix Samba test to support recent as well
as upcoming Samba releases.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc26
2 files changed, 21 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 426872fc7..b7572d2ed 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (fs_info::update): Fix Samba test to support recent as well
+ as upcoming Samba releases.
+
2008-01-15 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (install-libs): Overwrite newlib's libg.a with symlink
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index f857f168e..9187f866d 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -423,17 +423,23 @@ fs_info::update (const char *win32_path)
return false;
}
-#define FS_IS_SAMBA (FILE_CASE_SENSITIVE_SEARCH \
- | FILE_CASE_PRESERVED_NAMES \
- | FILE_PERSISTENT_ACLS)
-#define FS_IS_SAMBA_WITH_QUOTA \
- (FILE_CASE_SENSITIVE_SEARCH \
- | FILE_CASE_PRESERVED_NAMES \
- | FILE_PERSISTENT_ACLS \
- | FILE_VOLUME_QUOTAS)
+/* Test only flags indicating capabilities, ignore flags indicating a specific
+ state of the volume. At present ignore FILE_VOLUME_IS_COMPRESSED and
+ FILE_READ_ONLY_VOLUME. */
+#define GETVOLINFO_VALID_MASK (0x003701ffUL)
+/* Volume quotas are potentially supported since Samba 3.0, object ids and
+ the unicode on disk flag since Samba 3.2. */
+#define SAMBA_IGNORE (FILE_VOLUME_QUOTAS \
+ | FILE_SUPPORTS_OBJECT_IDS \
+ | FILE_UNICODE_ON_DISK)
+#define SAMBA_REQIURED (FILE_CASE_SENSITIVE_SEARCH \
+ | FILE_CASE_PRESERVED_NAMES \
+ | FILE_PERSISTENT_ACLS)
+#define FS_IS_SAMBA ((flags () & GETVOLINFO_VALID_MASK & ~SAMBA_IGNORE) \
+ == SAMBA_REQIURED)
+
is_fat (strncasematch (fsname, "FAT", 3));
- is_samba (strcmp (fsname, "NTFS") == 0 && is_remote_drive ()
- && (flags () == FS_IS_SAMBA || flags () == FS_IS_SAMBA_WITH_QUOTA));
+ is_samba (strcmp (fsname, "NTFS") == 0 && is_remote_drive () && FS_IS_SAMBA);
is_ntfs (strcmp (fsname, "NTFS") == 0 && !is_samba ());
is_nfs (strcmp (fsname, "NFS") == 0);