Whamcloud - gitweb
For remote client, do not permit getfacl/setfacl directly.
authorfanyong <fanyong>
Mon, 16 Oct 2006 07:26:38 +0000 (07:26 +0000)
committerfanyong <fanyong>
Mon, 16 Oct 2006 07:26:38 +0000 (07:26 +0000)
lustre/llite/xattr.c

index a4daa63..5a163f1 100644 (file)
@@ -88,10 +88,17 @@ int get_xattr_type(const char *name)
 static
 int xattr_type_filter(struct ll_sb_info *sbi, int xattr_type)
 {
-        if ((xattr_type == XATTR_ACL_ACCESS_T ||
-             xattr_type == XATTR_ACL_DEFAULT_T) &&
-            !(sbi->ll_flags & LL_SBI_ACL))
-                return -EOPNOTSUPP;
+        if ((xattr_type == XATTR_ACL_ACCESS_T) ||
+            (xattr_type == XATTR_ACL_DEFAULT_T)) {
+                if (sbi->ll_flags & LL_SBI_RMT_CLIENT) {
+                        CWARN("For remote client, "
+                              "repalce \"xetfacl\" with \"lfs xetfacl\"");
+                        return -EOPNOTSUPP;
+                } else if (!(sbi->ll_flags & LL_SBI_ACL)) {
+                        CWARN("Server not support xetfacl\n");
+                        return -EOPNOTSUPP;
+                }
+        }
 
         if (xattr_type == XATTR_USER_T && !(sbi->ll_flags & LL_SBI_USER_XATTR))
                 return -EOPNOTSUPP;