Message ID | 20190228224356.2608-17-casey@schaufler-ca.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-security-module-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C9AE1399 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:44:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EE0A2FA27 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:44:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12E382FB98; Thu, 28 Feb 2019 22:44:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9ABE2FB96 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729999AbfB1Wob (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Thu, 28 Feb 2019 17:44:31 -0500 Received: from sonic307-10.consmr.mail.bf2.yahoo.com ([74.6.134.49]:37841 "EHLO sonic307-10.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730042AbfB1Wo3 (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Thu, 28 Feb 2019 17:44:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo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faZ36u94HTKSqnYNIAIO.6iZvBtb1tc2X9X5lS7M8.bNYShw9IY5akZV9MfjmVlwKtuHHsa6_ Mxk_YZPTPWEgiLi07JENWd5KPVwj8ASZ77ZaH94r1krZDwjs_Gblo3Y1FeFdiDNXIw9Smicuj7Da 5s1RNHod5z5rGzmAfNBLWAHsXWOsB5SZq6GVMy8adr_VLtCwybOcSm1YPTQ4e791PL5hQDTGPFVG B7TYq0joN7i562fhhkFcVzLBD.99173l3MeMwFgvjMqi1q.g.F0bEDqKDz7hDGkCFVvmZTthaTbb K4NUy62TRQeKcSX.toEheExUkyIUf2gpR1BQqPlGEatBvBxAgTa5O1A1g7R06fDmiH0obhRMYnOI 55UuUtAT8shi68HgmPnqApenrlyJbAnfVdacGTXMMc82EvEB4arQilwLwCBzgO.0sx7SEqxppq1W JbwTl4HenwISTUeqgGepUoo4CzLBQ0mIHRlEDGs56PM_6bmg.KSZ7yUv8eOVt1Exf_CU0ZvlYF1n 8UGOdgXmy6RoElCFyc1xl4O5RwRx5Ack8pgBQyOSgj0udQ2D8m2VzNHg- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.bf2.yahoo.com with HTTP; Thu, 28 Feb 2019 22:44:28 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO localhost.localdomain) ([67.169.65.224]) by smtp415.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 46c3ca42412e81058eafbaa96f791691; Thu, 28 Feb 2019 22:44:25 +0000 (UTC) From: Casey Schaufler <casey@schaufler-ca.com> To: jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Cc: keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com Subject: [PATCH 86/97] Smack: Don't set the socket label on each send Date: Thu, 28 Feb 2019 14:43:45 -0800 Message-Id: <20190228224356.2608-17-casey@schaufler-ca.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190228224356.2608-1-casey@schaufler-ca.com> References: <20190228224356.2608-1-casey@schaufler-ca.com> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: <linux-security-module.vger.kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
LSM: Complete module stacking
|
expand
|
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)
The socket does not need to be relabeled on each send. Remove the code that does that. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> --- security/smack/smack_lsm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)