From patchwork Wed Apr 5 21:54:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Casey Schaufler X-Patchwork-Id: 9665805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 01D5D602B5 for ; Wed, 5 Apr 2017 21:54:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7DDE28173 for ; Wed, 5 Apr 2017 21:54:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCBCA2856D; Wed, 5 Apr 2017 21:54:31 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 670AB28173 for ; Wed, 5 Apr 2017 21:54:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933655AbdDEVya (ORCPT ); Wed, 5 Apr 2017 17:54:30 -0400 Received: from nm25-vm2.bullet.mail.ne1.yahoo.com ([98.138.91.213]:55670 "EHLO nm25-vm2.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933475AbdDEVya (ORCPT ); Wed, 5 Apr 2017 17:54:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1491429269; bh=uAbtPJLdoxTa+hgWxnzb8MDfveaB6OhnMb3Nj2QJ0aE=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=Ws+cZ6IzNC3MD+83lUkBO/vKJSr3t7O3rq9YVPQMKMgfhfD0sGyh5kYr36UJJGmavtteHatBMarfcx8O+e+r00Rndy9crFrKlBijBJEmsSG2Y3hGo+JRD5NG9liiFXeX2KXBsgzTzl7VVfUkRU8Ylnq/JXrKj1gaJfelLkskpIYPDVgba1+4aVXGHhtsQi85HV+NKA4rTsLEWggZPMLnBTQJ+OcqTbOCqsxeUWa7pcKPOlbr8BMSX1n1ZODbfH3TKsq04Itt3kCF7f8eq8F/SQ1VB3VYXd05TLev7G9szDqqXqUCX/675pn8BqBkhlhoiuySKbk6ut+C+4ibHAm/Zg== Received: from [98.138.226.177] by nm25.bullet.mail.ne1.yahoo.com with NNFMP; 05 Apr 2017 21:54:29 -0000 Received: from [98.138.104.115] by tm12.bullet.mail.ne1.yahoo.com with NNFMP; 05 Apr 2017 21:54:29 -0000 Received: from [127.0.0.1] by smtp224.mail.ne1.yahoo.com with NNFMP; 05 Apr 2017 21:54:29 -0000 X-Yahoo-Newman-Id: 505504.74457.bm@smtp224.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: BerbMIsVM1nXClT2yafzMFdRJnnVVUKZmNeJUt3T9Oovrw9 Geq7lmVEXt56_BiJcE7Yp0KvTdaIaV4AH5jjp_3NGwhI09ef_IjK7srGMw19 NjLC5BhV3C8QlNPZiJcRNomyYSC8L1nrVNStjvaKum9r.eMl_j2V.1HJUade .n7EApwjDXxJzinKDRTFiNxr41k6gHbBR6SJ2JuQ_NAYfzEYOOvsFMdzmPbG cVf0Sr637o0kKeK_brHZvbq0WA1gJadW2Bge_K0soNRBou48km58I0uTTyIh vfZE6s0vF29y71hA73ThSuJGXu_uDrhri2RWB.Jpq.sIa.nSUuSGdX2JT7A4 umN9PG_VIKOX9OTg1Inly7lNh1z1mVn8SvtoXji9YdTY.m.FJi3LgI5oORi6 XqCT3B8fB6_UnOjU0DRo97tWXt0lCFTAUjqQrA_EbLUFOEmbVYoElsdBzKKM TFR4J0pzA66yoF.n5EXkR8WGMREUAP3jSqimMFHnG06MIp25nMXKp4t8EEdO EfjO_crOlTtFBhK1LItA3x6_XH421RkmZcRvojRQl9tE.7d8LCLdq4aRZTcC aIzAitEBMSw-- X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: [PATCH RFC 10/11] Smack: sendmsg compile error fix To: LSM , James Morris References: <509e0281-9f8a-83c2-f9d6-5532903cda46@schaufler-ca.com> Cc: John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , Kees Cook , Casey Schaufler From: Casey Schaufler Message-ID: Date: Wed, 5 Apr 2017 14:54:24 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <509e0281-9f8a-83c2-f9d6-5532903cda46@schaufler-ca.com> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Subject: [PATCH RFC 10/11] Smack: sendmsg compile error fix Move the declaration of ssp out of ifdefs as it's now always required. Signed-off-by: Casey Schaufler --- security/smack/smack_lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index e1264b9..2ac6d33 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -3637,11 +3637,11 @@ static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size, struct netlbl_lsm_secattr **attrs) { struct sockaddr_in *sip = (struct sockaddr_in *) msg->msg_name; + struct socket_smack *ssp = smack_sock(sock->sk); #if IS_ENABLED(CONFIG_IPV6) struct sockaddr_in6 *sap = (struct sockaddr_in6 *) msg->msg_name; #endif #ifdef SMACK_IPV6_SECMARK_LABELING - struct socket_smack *ssp = smack_sock(sock->sk); struct smack_known *rsp; #endif int rc = 0;