mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[NETFILTER] nfnetlink: unconditionally require CAP_NET_ADMIN
This patch unconditionally requires CAP_NET_ADMIN for all nfnetlink messages. It also removes the per-message cap_required field, since all existing subsystems use CAP_NET_ADMIN for all their messages anyway. Patrick McHardy owes me a beer if we ever need to re-introduce this. Signed-off-by: Harald Welte <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3746a2b140
commit
37d2e7a20d
5 changed files with 24 additions and 41 deletions
|
|
@ -1543,29 +1543,22 @@ static struct notifier_block ctnl_notifier_exp = {
|
|||
|
||||
static struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = {
|
||||
[IPCTNL_MSG_CT_NEW] = { .call = ctnetlink_new_conntrack,
|
||||
.attr_count = CTA_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_MAX, },
|
||||
[IPCTNL_MSG_CT_GET] = { .call = ctnetlink_get_conntrack,
|
||||
.attr_count = CTA_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_MAX, },
|
||||
[IPCTNL_MSG_CT_DELETE] = { .call = ctnetlink_del_conntrack,
|
||||
.attr_count = CTA_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_MAX, },
|
||||
[IPCTNL_MSG_CT_GET_CTRZERO] = { .call = ctnetlink_get_conntrack,
|
||||
.attr_count = CTA_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_MAX, },
|
||||
};
|
||||
|
||||
static struct nfnl_callback ctnl_exp_cb[IPCTNL_MSG_EXP_MAX] = {
|
||||
[IPCTNL_MSG_EXP_GET] = { .call = ctnetlink_get_expect,
|
||||
.attr_count = CTA_EXPECT_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_EXPECT_MAX, },
|
||||
[IPCTNL_MSG_EXP_NEW] = { .call = ctnetlink_new_expect,
|
||||
.attr_count = CTA_EXPECT_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_EXPECT_MAX, },
|
||||
[IPCTNL_MSG_EXP_DELETE] = { .call = ctnetlink_del_expect,
|
||||
.attr_count = CTA_EXPECT_MAX,
|
||||
.cap_required = CAP_NET_ADMIN },
|
||||
.attr_count = CTA_EXPECT_MAX, },
|
||||
};
|
||||
|
||||
static struct nfnetlink_subsystem ctnl_subsys = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue