Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264380
b: refs/heads/master
c: 6230c9b
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and David S. Miller committed Oct 19, 2011
1 parent 46477fd commit b628f95
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 835acf5da239b91edb9f7ebe36516999e156e6ee
refs/heads/master: 6230c9b4f8957c8938ee4cf2d03166d3c2dc89de
4 changes: 4 additions & 0 deletions trunk/net/bluetooth/l2cap_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

/* Bluetooth L2CAP sockets. */

#include <linux/security.h>

#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/l2cap.h>
Expand Down Expand Up @@ -933,6 +935,8 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
chan->force_reliable = pchan->force_reliable;
chan->flushable = pchan->flushable;
chan->force_active = pchan->force_active;

security_sk_clone(parent, sk);
} else {

switch (sk->sk_type) {
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/bluetooth/rfcomm/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <linux/device.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/security.h>
#include <net/sock.h>

#include <asm/system.h>
Expand Down Expand Up @@ -264,6 +265,8 @@ static void rfcomm_sock_init(struct sock *sk, struct sock *parent)

pi->sec_level = rfcomm_pi(parent)->sec_level;
pi->role_switch = rfcomm_pi(parent)->role_switch;

security_sk_clone(parent, sk);
} else {
pi->dlc->defer_setup = 0;

Expand Down
5 changes: 4 additions & 1 deletion trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/list.h>
#include <linux/security.h>
#include <net/sock.h>

#include <asm/system.h>
Expand Down Expand Up @@ -403,8 +404,10 @@ static void sco_sock_init(struct sock *sk, struct sock *parent)
{
BT_DBG("sk %p", sk);

if (parent)
if (parent) {
sk->sk_type = parent->sk_type;
security_sk_clone(parent, sk);
}
}

static struct proto sco_proto = {
Expand Down
1 change: 1 addition & 0 deletions trunk/security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ void security_sk_clone(const struct sock *sk, struct sock *newsk)
{
security_ops->sk_clone_security(sk, newsk);
}
EXPORT_SYMBOL(security_sk_clone);

void security_sk_classify_flow(struct sock *sk, struct flowi *fl)
{
Expand Down

0 comments on commit b628f95

Please sign in to comment.