Fix bug #6016 - Alternate Data Streams / Extended Attributes seem to conflict.
authorJeremy Allison <jra@samba.org>
Wed, 7 Jan 2009 22:57:20 +0000 (14:57 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 7 Jan 2009 22:57:20 +0000 (14:57 -0800)
Jeremy.

source3/smbd/dosmode.c

index de0748236966020fdbab46e2341659652667ccb8..ade5e66e86f36b904431ff5d4759139236fa4042 100644 (file)
@@ -203,13 +203,16 @@ static bool get_ea_dos_attribute(connection_struct *conn, const char *path,SMB_S
 
        sizeret = SMB_VFS_GETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, sizeof(attrstr));
        if (sizeret == -1) {
-#if defined(ENOTSUP) && defined(ENOATTR)
-               if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno != EACCES) && (errno != EPERM)) {
+               if (errno == ENOSYS
+#if defined(ENOTSUP)
+                       || errno == ENOTSUP) {
+#else
+                               ) {
+#endif
                        DEBUG(1,("get_ea_dos_attributes: Cannot get attribute from EA on file %s: Error = %s\n",
                                path, strerror(errno) ));
                        set_store_dos_attributes(SNUM(conn), False);
                }
-#endif
                return False;
        }
        /* Null terminate string. */
@@ -263,6 +266,8 @@ static bool set_ea_dos_attribute(connection_struct *conn, const char *path, SMB_
 #else
                                ) {
 #endif
+                               DEBUG(1,("set_ea_dos_attributes: Cannot set attribute EA on file %s: Error = %s\n",
+                                       path, strerror(errno) ));
                                set_store_dos_attributes(SNUM(conn), False);
                        }
                        return False;