|
@@ -313,6 +313,12 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
|
|
|
(task_active_pid_ns(current) != &init_pid_ns))
|
|
|
return;
|
|
|
|
|
|
+ /* Can only change if privileged. */
|
|
|
+ if (!capable(CAP_NET_ADMIN)) {
|
|
|
+ err = EPERM;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
+
|
|
|
mc_op = (enum proc_cn_mcast_op *)msg->data;
|
|
|
switch (*mc_op) {
|
|
|
case PROC_CN_MCAST_LISTEN:
|
|
@@ -325,6 +331,8 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
|
|
|
err = EINVAL;
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+out:
|
|
|
cn_proc_ack(err, msg->seq, msg->ack);
|
|
|
}
|
|
|
|