projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NETLINK]: Encapsulate eff_cap usage within security framework.
[deliverable/linux.git]
/
net
/
decnet
/
netfilter
/
dn_rtmsg.c
diff --git
a/net/decnet/netfilter/dn_rtmsg.c
b/net/decnet/netfilter/dn_rtmsg.c
index 353fed6888f95eb1e37deca4b4ddbdb0d7401576..8b99bd33540d53fc072278aa6ade21906a541f90 100644
(file)
--- a/
net/decnet/netfilter/dn_rtmsg.c
+++ b/
net/decnet/netfilter/dn_rtmsg.c
@@
-19,14
+19,13
@@
#include <linux/netfilter.h>
#include <linux/spinlock.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/spinlock.h>
#include <linux/netlink.h>
+#include <linux/netfilter_decnet.h>
#include <net/sock.h>
#include <net/flow.h>
#include <net/dn.h>
#include <net/dn_route.h>
#include <net/sock.h>
#include <net/flow.h>
#include <net/dn.h>
#include <net/dn_route.h>
-#include <linux/netfilter_decnet.h>
-
static struct sock *dnrmg = NULL;
static struct sock *dnrmg = NULL;
@@
-71,10
+70,10
@@
static void dnrmg_send_peer(struct sk_buff *skb)
switch(flags & DN_RT_CNTL_MSK) {
case DN_RT_PKT_L1RT:
switch(flags & DN_RT_CNTL_MSK) {
case DN_RT_PKT_L1RT:
- group = DNR
MG_L1_NLGRP
;
+ group = DNR
NG_NLGRP_L1
;
break;
case DN_RT_PKT_L2RT:
break;
case DN_RT_PKT_L2RT:
- group = DNR
MG_L2_NLGRP
;
+ group = DNR
NG_NLGRP_L2
;
break;
default:
return;
break;
default:
return;
@@
-108,7
+107,7
@@
static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
return;
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
return;
- if (
!cap_raised(NETLINK_CB(skb).eff_cap
, CAP_NET_ADMIN))
+ if (
security_netlink_recv(skb
, CAP_NET_ADMIN))
RCV_SKB_FAIL(-EPERM);
/* Eventually we might send routing messages too */
RCV_SKB_FAIL(-EPERM);
/* Eventually we might send routing messages too */
@@
-134,12
+133,12
@@
static struct nf_hook_ops dnrmg_ops = {
.priority = NF_DN_PRI_DNRTMSG,
};
.priority = NF_DN_PRI_DNRTMSG,
};
-static int __init init(void)
+static int __init
dn_rtmsg_
init(void)
{
int rv = 0;
{
int rv = 0;
- dnrmg = netlink_kernel_create(NETLINK_DNRTMSG,
dnrmg_receive_user_sk
,
- THIS_MODULE);
+ dnrmg = netlink_kernel_create(NETLINK_DNRTMSG,
DNRNG_NLGRP_MAX
,
+
dnrmg_receive_user_sk,
THIS_MODULE);
if (dnrmg == NULL) {
printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket");
return -ENOMEM;
if (dnrmg == NULL) {
printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket");
return -ENOMEM;
@@
-153,7
+152,7
@@
static int __init init(void)
return rv;
}
return rv;
}
-static void __exit fini(void)
+static void __exit
dn_rtmsg_
fini(void)
{
nf_unregister_hook(&dnrmg_ops);
sock_release(dnrmg->sk_socket);
{
nf_unregister_hook(&dnrmg_ops);
sock_release(dnrmg->sk_socket);
@@
-165,6
+164,6
@@
MODULE_AUTHOR("Steven Whitehouse <steve@chygwyn.com>");
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_DNRTMSG);
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_DNRTMSG);
-module_init(init);
-module_exit(fini);
+module_init(
dn_rtmsg_
init);
+module_exit(
dn_rtmsg_
fini);
This page took
0.027939 seconds
and
5
git commands to generate.