Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264564
b: refs/heads/master
c: 975d5e5
h: refs/heads/master
v: v3
  • Loading branch information
Casey Schaufler authored and Casey Schaufler committed Oct 12, 2011
1 parent 1120c47 commit 55cfa50
Show file tree
Hide file tree
Showing 2 changed files with 10 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: ce8a432197d9892689eb4896f690b9fe6b3de598
refs/heads/master: 975d5e55c2e78b755bd0b92b71db1c241c5a2665
9 changes: 9 additions & 0 deletions trunk/security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2773,6 +2773,7 @@ static int smack_unix_stream_connect(struct sock *sock,
{
struct socket_smack *ssp = sock->sk_security;
struct socket_smack *osp = other->sk_security;
struct socket_smack *nsp = newsk->sk_security;
struct smk_audit_info ad;
int rc = 0;

Expand All @@ -2782,6 +2783,14 @@ static int smack_unix_stream_connect(struct sock *sock,
if (!capable(CAP_MAC_OVERRIDE))
rc = smk_access(ssp->smk_out, osp->smk_in, MAY_WRITE, &ad);

/*
* Cross reference the peer labels for SO_PEERSEC.
*/
if (rc == 0) {
nsp->smk_packet = ssp->smk_out;
ssp->smk_packet = osp->smk_out;
}

return rc;
}

Expand Down

0 comments on commit 55cfa50

Please sign in to comment.