aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-01-09 17:46:24 -0500
committerJames Morris <jmorris@namei.org>2011-01-09 17:46:24 -0500
commitd2e7ad19229f982fc1eb731827d82ceac90abfb3 (patch)
tree98a3741b4d4b27a48b3c7ea9babe331e539416a8 /security/smack
parentd03a5d888fb688c832d470b749acc5ed38e0bc1d (diff)
parent0c21e3aaf6ae85bee804a325aa29c325209180fd (diff)
Merge branch 'master' into next
Conflicts: security/smack/smack_lsm.c Verified and added fix by Stephen Rothwell <sfr@canb.auug.org.au> Ok'd by Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/smack')
-rw-r--r--security/smack/smack_lsm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 05dc4da2e25f..533bf3255d7f 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -2527,23 +2527,23 @@ static int smack_setprocattr(struct task_struct *p, char *name,
2527 2527
2528/** 2528/**
2529 * smack_unix_stream_connect - Smack access on UDS 2529 * smack_unix_stream_connect - Smack access on UDS
2530 * @sock: one socket 2530 * @sock: one sock
2531 * @other: the other socket 2531 * @other: the other sock
2532 * @newsk: unused 2532 * @newsk: unused
2533 * 2533 *
2534 * Return 0 if a subject with the smack of sock could access 2534 * Return 0 if a subject with the smack of sock could access
2535 * an object with the smack of other, otherwise an error code 2535 * an object with the smack of other, otherwise an error code
2536 */ 2536 */
2537static int smack_unix_stream_connect(struct socket *sock, 2537static int smack_unix_stream_connect(struct sock *sock,
2538 struct socket *other, struct sock *newsk) 2538 struct sock *other, struct sock *newsk)
2539{ 2539{
2540 struct socket_smack *ssp = sock->sk->sk_security; 2540 struct socket_smack *ssp = sock->sk_security;
2541 struct socket_smack *osp = other->sk->sk_security; 2541 struct socket_smack *osp = other->sk_security;
2542 struct smk_audit_info ad; 2542 struct smk_audit_info ad;
2543 int rc = 0; 2543 int rc = 0;
2544 2544
2545 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET); 2545 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET);
2546 smk_ad_setfield_u_net_sk(&ad, other->sk); 2546 smk_ad_setfield_u_net_sk(&ad, other);
2547 2547
2548 if (!capable(CAP_MAC_OVERRIDE)) 2548 if (!capable(CAP_MAC_OVERRIDE))
2549 rc = smk_access(ssp->smk_out, osp->smk_in, MAY_WRITE, &ad); 2549 rc = smk_access(ssp->smk_out, osp->smk_in, MAY_WRITE, &ad);