X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=inline;f=lustre%2Fmdd%2Fmdd_object.c;h=39d3814ab6609642f50a91f248aa316d35c8fb1b;hb=13832778224ff7807225fb8b88491e8e982e36c6;hp=74b628b21fd0b1503db0d18f8a17a9d034d1a9a0;hpb=41c4d2543958c8ddb08da0c0dbecb7941267e992;p=fs%2Flustre-release.git diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 74b628b..39d3814 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -735,6 +735,7 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj, /* Bypass la_vaild == LA_MODE, * this is for changing file with SUID or SGID. */ if ((la->la_valid & ~LA_MODE) && + !(ma->ma_attr_flags & MDS_PERM_BYPASS) && (uc->mu_fsuid != tmp_la->la_uid) && !mdd_capable(uc, CAP_FOWNER)) RETURN(-EPERM);