dect
/
linux-2.6
Archived
13
0
Fork 0

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

Pull user namespace compile fix from Eric W Biederman:
 "This tree contains a trivial build fix for one of the staging drivers
  when user namespace support is enabled"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  userns: Fix build of drivers/staging/dgrp
This commit is contained in:
Linus Torvalds 2012-10-03 16:09:09 -07:00
commit 3a494318b1
1 changed files with 2 additions and 2 deletions

View File

@ -179,9 +179,9 @@ void dgrp_carrier(struct ch_struct *ch)
*/
int dgrp_chk_perm(int mode, int op)
{
if (!current_euid())
if (!uid_eq(GLOBAL_ROOT_UID, current_euid()))
mode >>= 6;
else if (in_egroup_p(0))
else if (in_egroup_p(GLOBAL_ROOT_GID))
mode >>= 3;
if ((mode & op & 0007) == op)