aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-11-06 01:18:14 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-06 01:18:14 -0500
commit3f378b684453f2a028eda463ce383370545d9cc9 (patch)
treedc50d087e137c6d173e25ae10ecd0f10823eca7a /net/irda
parent13f18aa05f5abe135f47b6417537ae2b2fedc18c (diff)
net: pass kern to net_proto_family create function
The generic __sock_create function has a kern argument which allows the security system to make decisions based on if a socket is being created by the kernel or by userspace. This patch passes that flag to the net_proto_family specific create function, so it can do the same thing. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/af_irda.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 9429e4002bca..e73a0016c0aa 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -61,7 +61,7 @@
61 61
62#include <net/irda/af_irda.h> 62#include <net/irda/af_irda.h>
63 63
64static int irda_create(struct net *net, struct socket *sock, int protocol); 64static int irda_create(struct net *net, struct socket *sock, int protocol, int kern);
65 65
66static const struct proto_ops irda_stream_ops; 66static const struct proto_ops irda_stream_ops;
67static const struct proto_ops irda_seqpacket_ops; 67static const struct proto_ops irda_seqpacket_ops;
@@ -839,7 +839,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
839 839
840 IRDA_DEBUG(2, "%s()\n", __func__); 840 IRDA_DEBUG(2, "%s()\n", __func__);
841 841
842 err = irda_create(sock_net(sk), newsock, sk->sk_protocol); 842 err = irda_create(sock_net(sk), newsock, sk->sk_protocol, 0);
843 if (err) 843 if (err)
844 return err; 844 return err;
845 845
@@ -1062,7 +1062,8 @@ static struct proto irda_proto = {
1062 * Create IrDA socket 1062 * Create IrDA socket
1063 * 1063 *
1064 */ 1064 */
1065static int irda_create(struct net *net, struct socket *sock, int protocol) 1065static int irda_create(struct net *net, struct socket *sock, int protocol,
1066 int kern)
1066{ 1067{
1067 struct sock *sk; 1068 struct sock *sk;
1068 struct irda_sock *self; 1069 struct irda_sock *self;