From 8fc7af4efebad0ce866d4fa5cd754a82308f55f6 Mon Sep 17 00:00:00 2001 From: fanyong Date: Mon, 16 Oct 2006 07:26:38 +0000 Subject: [PATCH] For remote client, do not permit getfacl/setfacl directly. --- lustre/llite/xattr.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index a4daa63..5a163f1 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -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; -- 1.8.3.1