]> Pileus Git - ~andy/linux/blobdiff - fs/proc/proc_sysctl.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[~andy/linux] / fs / proc / proc_sysctl.c
index 21d836f40292dba85a47b61aed4b0b30028ec41f..3476bca8f7af93392539e28b14aeaf9b40c457a0 100644 (file)
@@ -371,9 +371,9 @@ void register_sysctl_root(struct ctl_table_root *root)
 
 static int test_perm(int mode, int op)
 {
-       if (!current_euid())
+       if (uid_eq(current_euid(), GLOBAL_ROOT_UID))
                mode >>= 6;
-       else if (in_egroup_p(0))
+       else if (in_egroup_p(GLOBAL_ROOT_GID))
                mode >>= 3;
        if ((op & ~mode & (MAY_READ|MAY_WRITE|MAY_EXEC)) == 0)
                return 0;