Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e0e7647 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Treehugger Robot
Browse files

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



This reverts commit 855a2b55 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: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent c6c759d1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
+1 −3
Original line number Diff line number Diff line
@@ -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,
	},
};