Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp25075imm; Fri, 21 Sep 2018 17:18:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV61k6Zl85T7N2twsXx95KkcIUUDGW3Y35N76nWp8FtzHhRtHxVd08rcCuU04oL6ZXMWtzuap X-Received: by 2002:a63:f616:: with SMTP id m22-v6mr92242pgh.293.1537575529662; Fri, 21 Sep 2018 17:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537575529; cv=none; d=google.com; s=arc-20160816; b=ScTmmmqEXJkvW4sV7UcwhNE990PZu1y5PZ853MpfemjV6P+bxMqxvFJ2wN2+U0//7T PQo/J8a1IrTiYoOgy2JT0y++4Vm/wks5lWTw2Oil5ry80vQlkrwI1JUgzLRDVWDsHAy9 eJTHy4HnEqnSRFwBiYzzV0Q8J7yVUiFWKnjbSZO1xq33CnvWOU8aedvpTi4ued6qS1ZG gLDzS636oyl9er0eRSS5gxE4ckTW9U5kOTBH71wWarz0YK5cP7pxsCD9lkgJgt+vQrz2 l5XB/RbZ9iOh5XwsXB5MIH00kpib22gIBSk2QTYAGwlDfvM9YGNAoGGeSKHSxkU5PinP Wt0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=IMmQkbUcHQ8vi6SVn3BZgviVDtcaEzGW2cw/jNYk9Ds=; b=ZgO1XFRjD9qUQlrxB013Ul+lchVz6QSafx+Y/2yl9x26cII2ig7+RU/e6vYI6qwJrB V5B3xw0xptw/ubMJTT/OeT3xKZ1dAvZEE/bYerhT9KBiKoXkuBJxCbcIxp3B8L6HWSz9 Sbm8Tqbkm5u2y8wSFgZMRNcmZPHklsGbJ82L96k2CXA174xHG5fr+7sFQGLXTypvhUiL OjZ65sKhqKLA4g6p8JfZmVYhdm0P9u8d19J+kiRnH8zG3VLyHv0u4vucOM485kruJnko NJ4m9jvGaRzMb/rEAqQcGnBGYWlgWNVhGGN04i9/IfzbyimRadxpdPyP4qK/BqcWbSL0 H/eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=Vc0zlRYp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7-v6si28007436pfh.3.2018.09.21.17.18.34; Fri, 21 Sep 2018 17:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=Vc0zlRYp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391760AbeIVGJA (ORCPT + 99 others); Sat, 22 Sep 2018 02:09:00 -0400 Received: from sonic305-10.consmr.mail.bf2.yahoo.com ([74.6.133.49]:39910 "EHLO sonic305-10.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391734AbeIVGJA (ORCPT ); Sat, 22 Sep 2018 02:09:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1537575463; bh=IMmQkbUcHQ8vi6SVn3BZgviVDtcaEzGW2cw/jNYk9Ds=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=Vc0zlRYpNTzSqAO7GlZUTUpq3RdjFUPbqz3IwsETErRTeOJvDaCTYT8B65bTpbAHdMTV4nycqPcY2K2t7x+4uropOcorKcWHgWU2l/tMEQc7XNrgEr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 jNhS.YB3LIcK7_rorr5QY_2dH1_kEa0SgqRWUiobDzxbHPplhAwXceXtYD1Tuui2GD6_QNFZb8m3 IWvRlei8DbJCz_78dtUioL0JuX.T9Eha551..V.Zm.C_8CVgu6pqBxDu0C0CnAW_IGFrMptDWs__ ca_H4TQwG_gFFJDYqXbAiVi0nD119XVWqMZUiP7G.XuNeMelnp1xX10WfWdmHjZFGD955kXDwd3y .1sh4TSY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Sat, 22 Sep 2018 00:17:43 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.102]) ([67.169.65.224]) by smtp431.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID cce5fe6cae5445a550b287377f7a228d; Sat, 22 Sep 2018 00:17:40 +0000 (UTC) Subject: [PATCH v4 05/19] SELinux: Remove unused selinux_is_enabled To: LSM , James Morris , SE Linux , LKLM , John Johansen , Kees Cook , Tetsuo Handa , Paul Moore , Stephen Smalley , "linux-fsdevel@vger.kernel.org" , Alexey Dobriyan , =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , Salvatore Mesoraca References: From: Casey Schaufler Message-ID: Date: Fri, 21 Sep 2018 17:17:34 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are no longer users of selinux_is_enabled(). Remove it. As selinux_is_enabled() is the only reason for include/linux/selinux.h remove that as well. Signed-off-by: Casey Schaufler --- include/linux/cred.h | 1 - include/linux/selinux.h | 35 -------------------------------- security/selinux/Makefile | 2 +- security/selinux/exports.c | 23 --------------------- security/selinux/hooks.c | 1 - security/selinux/include/audit.h | 3 --- security/selinux/ss/services.c | 1 - 7 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 include/linux/selinux.h delete mode 100644 security/selinux/exports.c diff --git a/include/linux/cred.h b/include/linux/cred.h index 7eed6101c791..2e715e202e6a 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/selinux.h b/include/linux/selinux.h deleted file mode 100644 index 44f459612690..000000000000 --- a/include/linux/selinux.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SELinux services exported to the rest of the kernel. - * - * Author: James Morris - * - * Copyright (C) 2005 Red Hat, Inc., James Morris - * Copyright (C) 2006 Trusted Computer Solutions, Inc. - * Copyright (C) 2006 IBM Corporation, Timothy R. Chavez - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, - * as published by the Free Software Foundation. - */ -#ifndef _LINUX_SELINUX_H -#define _LINUX_SELINUX_H - -struct selinux_audit_rule; -struct audit_context; -struct kern_ipc_perm; - -#ifdef CONFIG_SECURITY_SELINUX - -/** - * selinux_is_enabled - is SELinux enabled? - */ -bool selinux_is_enabled(void); -#else - -static inline bool selinux_is_enabled(void) -{ - return false; -} -#endif /* CONFIG_SECURITY_SELINUX */ - -#endif /* _LINUX_SELINUX_H */ diff --git a/security/selinux/Makefile b/security/selinux/Makefile index c7161f8792b2..ccf950409384 100644 --- a/security/selinux/Makefile +++ b/security/selinux/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_SECURITY_SELINUX) := selinux.o selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \ - netnode.o netport.o ibpkey.o exports.o \ + netnode.o netport.o ibpkey.o \ ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \ ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o diff --git a/security/selinux/exports.c b/security/selinux/exports.c deleted file mode 100644 index e75dd94e2d2b..000000000000 --- a/security/selinux/exports.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SELinux services exported to the rest of the kernel. - * - * Author: James Morris - * - * Copyright (C) 2005 Red Hat, Inc., James Morris - * Copyright (C) 2006 Trusted Computer Solutions, Inc. - * Copyright (C) 2006 IBM Corporation, Timothy R. Chavez - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, - * as published by the Free Software Foundation. - */ -#include -#include - -#include "security.h" - -bool selinux_is_enabled(void) -{ - return selinux_enabled; -} -EXPORT_SYMBOL_GPL(selinux_is_enabled); diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 80614ca25a2b..82b28ee878c4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -79,7 +79,6 @@ #include #include #include -#include #include #include #include diff --git a/security/selinux/include/audit.h b/security/selinux/include/audit.h index 1bdf973433cc..36e1d44c0209 100644 --- a/security/selinux/include/audit.h +++ b/security/selinux/include/audit.h @@ -1,9 +1,6 @@ /* * SELinux support for the Audit LSM hooks * - * Most of below header was moved from include/linux/selinux.h which - * is released under below copyrights: - * * Author: James Morris * * Copyright (C) 2005 Red Hat, Inc., James Morris diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index f3def298a90e..e2235f1a99aa 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include -- 2.17.1