]> err.no Git - linux-2.6/blobdiff - fs/cifs/xattr.c
ext[234]: use ext[234]_get_group_desc()
[linux-2.6] / fs / cifs / xattr.c
index 836c39e7c09a26aa1fac77672abdfcec80a6a1e3..54e8ef96cb7930c07734aa9f0b808eaa2e215953 100644 (file)
@@ -184,7 +184,8 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
                        cFYI(1, ("set default POSIX ACL not supported"));
 #endif
                } else {
-                       cFYI(1, ("illegal xattr request %s (only user namespace supported)", ea_name));
+                       cFYI(1, ("illegal xattr request %s (only user namespace"
+                                " supported)", ea_name));
                  /* BB what if no namespace prefix? */
                  /* Should we just pass them to server, except for
                  system and perhaps security prefixes? */
@@ -260,21 +261,27 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
                                cifs_sb->local_nls,
                                cifs_sb->mnt_cifs_flags &
                                        CIFS_MOUNT_MAP_SPECIAL_CHR);
-/*             else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
+#ifdef CONFIG_CIFS_EXPERIMENTAL
+               else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
                        __u16 fid;
                        int oplock = FALSE;
-                       rc = CIFSSMBOpen(xid, pTcon, full_path,
-                                        FILE_OPEN, GENERIC_READ, 0, &fid,
-                                        &oplock, NULL, cifs_sb->local_nls,
-                                        cifs_sb->mnt_cifs_flags &
-                                        CIFS_MOUNT_MAP_SPECIAL_CHR);
-                       if(rc == 0) {
-                               rc = CIFSSMBGetCIFSACL(xid, pTcon, fid,
-                                       ea_value, buf_size,
-                                       ACL_TYPE_ACCESS);
+                       struct cifs_ntsd *pacl = NULL;
+                       __u32 buflen = 0;
+                       if (experimEnabled)
+                               rc = CIFSSMBOpen(xid, pTcon, full_path,
+                                       FILE_OPEN, GENERIC_READ, 0, &fid,
+                                       &oplock, NULL, cifs_sb->local_nls,
+                                       cifs_sb->mnt_cifs_flags &
+                                       CIFS_MOUNT_MAP_SPECIAL_CHR);
+                       /* else rc is EOPNOTSUPP from above */
+
+                       if (rc == 0) {
+                               rc = CIFSSMBGetCIFSACL(xid, pTcon, fid, &pacl,
+                                                     &buflen);
                                CIFSSMBClose(xid, pTcon, fid);
                        }
-               } */  /* BB enable after fixing up return data */
+               }
+#endif /* EXPERIMENTAL */
 #else
                cFYI(1, ("query POSIX ACL not supported yet"));
 #endif /* CONFIG_CIFS_POSIX */