[PATCH 79/90] Smack: Don't set the socket label on each send
Casey Schaufler
casey at schaufler-ca.com
Fri Apr 19 00:46:06 UTC 2019
The socket does not need to be relabeled on each send.
Remove the code that does that.
Signed-off-by: Casey Schaufler <casey at schaufler-ca.com>
---
security/smack/smack_lsm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index ace5b48f90dc..25b5160e343b 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -2466,10 +2466,7 @@ static int smack_netlabel_send(struct sock *sk, struct sockaddr_in *sap)
rc = smk_bu_note("IPv4 host check", skp, hkp, MAY_WRITE, rc);
}
rcu_read_unlock();
- if (rc != 0)
- return rc;
-
- return smack_netlabel(sk);
+ return rc;
}
#if IS_ENABLED(CONFIG_IPV6)
--
2.19.1
More information about the Linux-security-module-archive
mailing list