X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=net%2Fnetfilter%2Fxt_osf.c;h=a34f314a8c2380e6b6a223dd6d38dcc88ca2c1ac;hb=65bbbf6c205a5c9840553925c10f51db92d25394;hp=36e14b1f061ddf7eb77327a3e717e15b6af83bfb;hpb=0d7b5c93e52a539d900d966bdf7d79f9b7002e0a;p=sfrench%2Fcifs-2.6.git diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c index 36e14b1f061d..a34f314a8c23 100644 --- a/net/netfilter/xt_osf.c +++ b/net/netfilter/xt_osf.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,9 @@ static int xt_osf_add_callback(struct net *net, struct sock *ctnl, struct xt_osf_finger *kf = NULL, *sf; int err = 0; + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + if (!osf_attrs[OSF_ATTR_FINGER]) return -EINVAL; @@ -115,6 +119,9 @@ static int xt_osf_remove_callback(struct net *net, struct sock *ctnl, struct xt_osf_finger *sf; int err = -ENOENT; + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + if (!osf_attrs[OSF_ATTR_FINGER]) return -EINVAL;