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

Commit 5788c568 authored by Philipp Reisner's avatar Philipp Reisner Committed by David S. Miller
Browse files

dst/connector: Disallow unpliviged users to configure dst

parent 24836479
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -855,6 +855,11 @@ static void cn_dst_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
	struct dst_node *n = NULL, *tmp;
	unsigned int hash;

	if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) {
		err = -EPERM;
		goto out;
	}

	if (msg->len < sizeof(struct dst_ctl)) {
		err = -EBADMSG;
		goto out;