Skip to content

Commit

Permalink
staging: lustre: fix quotactl permission denied (LU-4530)
Browse files Browse the repository at this point in the history
The changes introduced in commit 4b1a25f ("fix build when
CONFIG_UIDGID_STRICT_TYPE_CHECKS is on") got the UID check the wrong way
around, leading to "Permission denied" when a regular user attempts to
retrieve his quota (lfs quota -u ...) but allowing him to retrieve other
users quota.

Full details at: https://jira.hpdd.intel.com/browse/LU-4530

Cc: Peng Tao <tao.peng@emc.com>
Cc: <stable@vger.kernel.org> # 3.12.x
Cc: <stable@vger.kernel.org> # 3.13.x
Signed-off-by: Cédric Dufour <cedric.dufour@idiap.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Cédric Dufour - Idiap Research Institute authored and Greg Kroah-Hartman committed Feb 7, 2014
1 parent ac5b705 commit 8b9e418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/llite/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl)
break;
case Q_GETQUOTA:
if (((type == USRQUOTA &&
uid_eq(current_euid(), make_kuid(&init_user_ns, id))) ||
!uid_eq(current_euid(), make_kuid(&init_user_ns, id))) ||
(type == GRPQUOTA &&
!in_egroup_p(make_kgid(&init_user_ns, id)))) &&
(!cfs_capable(CFS_CAP_SYS_ADMIN) ||
Expand Down

0 comments on commit 8b9e418

Please sign in to comment.