+2
-2
net/sysctl_net.c
+2
-2
net/sysctl_net.c
···
47
47
48
48
/* Allow network administrator to have same access as root. */
49
49
if (ns_capable(net->user_ns, CAP_NET_ADMIN) ||
50
-
uid_eq(root_uid, current_uid())) {
50
+
uid_eq(root_uid, current_euid())) {
51
51
int mode = (table->mode >> 6) & 7;
52
52
return (mode << 6) | (mode << 3) | mode;
53
53
}
54
54
/* Allow netns root group to have the same access as the root group */
55
-
if (gid_eq(root_gid, current_gid())) {
55
+
if (in_egroup_p(root_gid)) {
56
56
int mode = (table->mode >> 3) & 7;
57
57
return (mode << 3) | mode;
58
58
}