Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179121
b: refs/heads/master
c: dce766a
h: refs/heads/master
i:
  179119: b4df144
v: v3
  • Loading branch information
Florian Westphal authored and Patrick McHardy committed Jan 8, 2010
1 parent 318d509 commit 553d81c
Show file tree
Hide file tree
Showing 2 changed files with 7 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: aaff23a95aea5f000895f50d90e91f1e2f727002
refs/heads/master: dce766af541f6605fa9889892c0280bab31c66ab
6 changes: 6 additions & 0 deletions trunk/net/bridge/netfilter/ebtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,9 @@ static int do_ebt_set_ctl(struct sock *sk,
{
int ret;

if (!capable(CAP_NET_ADMIN))
return -EPERM;

switch(cmd) {
case EBT_SO_SET_ENTRIES:
ret = do_replace(sock_net(sk), user, len);
Expand All @@ -1425,6 +1428,9 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
struct ebt_replace tmp;
struct ebt_table *t;

if (!capable(CAP_NET_ADMIN))
return -EPERM;

if (copy_from_user(&tmp, user, sizeof(tmp)))
return -EFAULT;

Expand Down

0 comments on commit 553d81c

Please sign in to comment.