diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-07 15:50:56 -0800 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-21 03:13:36 -0700 |
commit | 39241beb78f69925b0475ad78f06f0e0589fb71b (patch) | |
tree | 526bdb9a4235b6a2dda6553855de9480af06f78d /fs/ubifs/budget.c | |
parent | 61293ee2749bc2414725da37e50308154ff91574 (diff) | |
download | lwn-39241beb78f69925b0475ad78f06f0e0589fb71b.tar.gz lwn-39241beb78f69925b0475ad78f06f0e0589fb71b.zip |
userns: Convert ubifs to use kuid/kgid
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/ubifs/budget.c')
-rw-r--r-- | fs/ubifs/budget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index bc4f94b28706..969489e478bc 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c @@ -272,8 +272,8 @@ long long ubifs_calc_available(const struct ubifs_info *c, int min_idx_lebs) */ static int can_use_rp(struct ubifs_info *c) { - if (current_fsuid() == c->rp_uid || capable(CAP_SYS_RESOURCE) || - (c->rp_gid != 0 && in_group_p(c->rp_gid))) + if (uid_eq(current_fsuid(), c->rp_uid) || capable(CAP_SYS_RESOURCE) || + (!gid_eq(c->rp_gid, GLOBAL_ROOT_GID) && in_group_p(c->rp_gid))) return 1; return 0; } |