[PATCH 86/97] Smack: Don't set the socket label on each send
Casey Schaufler
casey at schaufler-ca.com
Thu Feb 28 22:43:45 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 d2a73d8a6976..d9055a0df75c 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -2379,10 +2379,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.17.0
More information about the Linux-security-module-archive
mailing list