Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360774
b: refs/heads/master
c: e70ab97
h: refs/heads/master
v: v3
  • Loading branch information
Kees Cook authored and David S. Miller committed Feb 27, 2013
1 parent 9461a8a commit 47d700d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 114a6f8b52163c0232fbcd7f3808ff04dc61a9b5
refs/heads/master: e70ab977991964a5a7ad1182799451d067e62669
8 changes: 8 additions & 0 deletions trunk/drivers/connector/cn_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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);
}

Expand Down

0 comments on commit 47d700d

Please sign in to comment.