diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2012-10-02 18:37:37 -0400 |
|---|---|---|
| committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-10-03 12:52:08 -0400 |
| commit | 702e490211b2b7e448ebe1b3a07d97ad2fc07e03 (patch) | |
| tree | ac90b7219b98a2fcdd1f9f9f95d7b8575706f3f4 | |
| parent | 88265322c14cce39f7afbc416726ef4fac413298 (diff) | |
userns: Fix build of drivers/staging/dgrp
Explicitly test for GLOBAL_ROOT_UID and GLOBAL_ROOT_GID
instead of using 0, allowing dgrp to compile and work
properly when user namespace support is enabled.
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
| -rw-r--r-- | drivers/staging/dgrp/dgrp_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/dgrp/dgrp_common.c b/drivers/staging/dgrp/dgrp_common.c index fce74e7fb834..3553998b72bc 100644 --- a/drivers/staging/dgrp/dgrp_common.c +++ b/drivers/staging/dgrp/dgrp_common.c | |||
| @@ -179,9 +179,9 @@ void dgrp_carrier(struct ch_struct *ch) | |||
| 179 | */ | 179 | */ |
| 180 | int dgrp_chk_perm(int mode, int op) | 180 | int dgrp_chk_perm(int mode, int op) |
| 181 | { | 181 | { |
| 182 | if (!current_euid()) | 182 | if (!uid_eq(GLOBAL_ROOT_UID, current_euid())) |
| 183 | mode >>= 6; | 183 | mode >>= 6; |
| 184 | else if (in_egroup_p(0)) | 184 | else if (in_egroup_p(GLOBAL_ROOT_GID)) |
| 185 | mode >>= 3; | 185 | mode >>= 3; |
| 186 | 186 | ||
| 187 | if ((mode & op & 0007) == op) | 187 | if ((mode & op & 0007) == op) |
