We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13caa8e commit 2433c8fCopy full SHA for 2433c8f
net/sysctl_net.c
@@ -47,12 +47,12 @@ static int net_ctl_permissions(struct ctl_table_header *head,
47
48
/* Allow network administrator to have same access as root. */
49
if (ns_capable(net->user_ns, CAP_NET_ADMIN) ||
50
- uid_eq(root_uid, current_uid())) {
+ uid_eq(root_uid, current_euid())) {
51
int mode = (table->mode >> 6) & 7;
52
return (mode << 6) | (mode << 3) | mode;
53
}
54
/* Allow netns root group to have the same access as the root group */
55
- if (gid_eq(root_gid, current_gid())) {
+ if (in_egroup_p(root_gid)) {
56
int mode = (table->mode >> 3) & 7;
57
return (mode << 3) | mode;
58
0 commit comments