From patchwork Tue Dec 10 16:55:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Smalley X-Patchwork-Id: 11283003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A366614BD for ; Tue, 10 Dec 2019 16:55:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 812F22077B for ; Tue, 10 Dec 2019 16:55:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=tycho.nsa.gov header.i=@tycho.nsa.gov header.b="WttlvMjB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727545AbfLJQz3 (ORCPT ); Tue, 10 Dec 2019 11:55:29 -0500 Received: from UCOL19PA34.eemsg.mail.mil ([214.24.24.194]:63525 "EHLO UCOL19PA34.eemsg.mail.mil" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727534AbfLJQz3 (ORCPT ); Tue, 10 Dec 2019 11:55:29 -0500 X-EEMSG-check-017: 59769345|UCOL19PA34_ESA_OUT01.csd.disa.mil X-IronPort-AV: E=Sophos;i="5.69,300,1571702400"; d="scan'208";a="59769345" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by UCOL19PA34.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 10 Dec 2019 16:55:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.nsa.gov; i=@tycho.nsa.gov; q=dns/txt; s=tycho.nsa.gov; t=1575996928; x=1607532928; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5xuJZ2Ul4JC1PjxCa51g2iIegrYxnhPpNPYexIlAVwI=; b=WttlvMjBx0WKIEwbGbe0dNsuLvfc5mDenXF137ehj8dQB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h1-uea11.NCSC.MIL with ESMTP; 10 Dec 2019 16:55:27 +0000 Received: from moss-pluto.infosec.tycho.ncsc.mil (moss-pluto [192.168.25.131]) by tarius.infosec.tycho.ncsc.mil (8.14.7/8.14.4) with ESMTP id xBAGtCxD051071; Tue, 10 Dec 2019 11:55:13 -0500 From: Stephen Smalley To: paul@paul-moore.com Cc: selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-next@vger.kernel.org, jamorris@linux.microsoft.com, Stephen Smalley Subject: [PATCH] security: only build lsm_audit if CONFIG_SECURITY=y Date: Tue, 10 Dec 2019 11:55:41 -0500 Message-Id: <20191210165541.85245-1-sds@tycho.nsa.gov> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: The lsm_audit code is only required when CONFIG_SECURITY is enabled. It does not have a build dependency on CONFIG_AUDIT since audit.h provides trivial static inlines for audit_log*() when CONFIG_AUDIT is disabled. Hence, the Makefile should only add lsm_audit to the obj lists based on CONFIG_SECURITY, not CONFIG_AUDIT. Fixes: 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") Signed-off-by: Stephen Smalley --- security/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/Makefile b/security/Makefile index be1dd9d2cb2f..746438499029 100644 --- a/security/Makefile +++ b/security/Makefile @@ -22,7 +22,7 @@ obj-$(CONFIG_SECURITY) += security.o obj-$(CONFIG_SECURITYFS) += inode.o obj-$(CONFIG_SECURITY_SELINUX) += selinux/ obj-$(CONFIG_SECURITY_SMACK) += smack/ -obj-$(CONFIG_AUDIT) += lsm_audit.o +obj-$(CONFIG_SECURITY) += lsm_audit.o obj-$(CONFIG_SECURITY_TOMOYO) += tomoyo/ obj-$(CONFIG_SECURITY_APPARMOR) += apparmor/ obj-$(CONFIG_SECURITY_YAMA) += yama/