Revert "drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group"

This reverts commit 855a2b559d which is
commit e03781879a0d524ce3126678d50a80484a513c4b upstream.

Well, it reverts portions of it, the main portion was already removed in
the merge of 4.19.302 due to other changes happening in the
net/netlink/genetlink.c file.  The main, abi breakage, was removed here
as well.  If all of this is needed in the Android 4.19 tree, it can be
brought back in an abi-safe way by applying the original patch, NOT by
reverting this revert, as that will not work properly.

Bug: 161946584
Change-Id: I4a2384672c0258853ffbc26416b426b3aafd809f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-12-18 18:52:34 +00:00
committed by Treehugger Robot
parent c6c759d1d8
commit 9e0e764749
2 changed files with 1 additions and 5 deletions

View File

@@ -11,12 +11,10 @@
/**
* struct genl_multicast_group - generic netlink multicast group
* @name: name of the multicast group, names are per-family
* @cap_sys_admin: whether %CAP_SYS_ADMIN is required for binding
*/
struct genl_multicast_group {
char name[GENL_NAMSIZ];
u8 flags;
u8 cap_sys_admin:1;
};
struct genl_ops;

View File

@@ -122,7 +122,7 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
}
static const struct genl_multicast_group dropmon_mcgrps[] = {
{ .name = "events", .cap_sys_admin = 1 },
{ .name = "events", },
};
static void send_dm_alert(struct work_struct *work)
@@ -370,12 +370,10 @@ static const struct genl_ops dropmon_ops[] = {
{
.cmd = NET_DM_CMD_START,
.doit = net_dm_cmd_trace,
.flags = GENL_ADMIN_PERM,
},
{
.cmd = NET_DM_CMD_STOP,
.doit = net_dm_cmd_trace,
.flags = GENL_ADMIN_PERM,
},
};