diff options
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/proc_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 21d836f40292..3476bca8f7af 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -371,9 +371,9 @@ void register_sysctl_root(struct ctl_table_root *root) | |||
371 | 371 | ||
372 | static int test_perm(int mode, int op) | 372 | static int test_perm(int mode, int op) |
373 | { | 373 | { |
374 | if (!current_euid()) | 374 | if (uid_eq(current_euid(), GLOBAL_ROOT_UID)) |
375 | mode >>= 6; | 375 | mode >>= 6; |
376 | else if (in_egroup_p(0)) | 376 | else if (in_egroup_p(GLOBAL_ROOT_GID)) |
377 | mode >>= 3; | 377 | mode >>= 3; |
378 | if ((op & ~mode & (MAY_READ|MAY_WRITE|MAY_EXEC)) == 0) | 378 | if ((op & ~mode & (MAY_READ|MAY_WRITE|MAY_EXEC)) == 0) |
379 | return 0; | 379 | return 0; |