Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7551C43387 for ; Sat, 12 Jan 2019 08:03:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7C0D205F4 for ; Sat, 12 Jan 2019 08:03:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=perfinion-com.20150623.gappssmtp.com header.i=@perfinion-com.20150623.gappssmtp.com header.b="V1/gdKy6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725834AbfALIDz (ORCPT ); Sat, 12 Jan 2019 03:03:55 -0500 Received: from mail-pl1-f172.google.com ([209.85.214.172]:45008 "EHLO mail-pl1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfALIDz (ORCPT ); Sat, 12 Jan 2019 03:03:55 -0500 Received: by mail-pl1-f172.google.com with SMTP id e11so7823965plt.11 for ; Sat, 12 Jan 2019 00:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HziGfX9PPA1ymebS6QffsOmm2qmG6S064n7K+Dxe8Rg=; b=V1/gdKy6ue7ZHco1A8soph7Hw3tSIXFkKbri5jIe3lRfRCQ4IlLROmjxGEbWY6+vzJ nG3HTFWrZxHGxZ+Vdyxne2g4qzkyjZoSSzYnf6uysE9RtajvBXeXSyJGo63Le/2Bvcwn tgHQt23VTRoSgKv0eMr8iQDVqj1dn9RoJio/KPOIzfkqxF9Laa66rEz1xvJHrxNFfoIl /6qRUb7Pe1at/0SGn6/8BMv3TTkJDt4ptWFiX3j17any/WihlYS6fzcfhTeVnM8owjKk jcQmQMnC/KB90uJAmAPe3Wv0LRvCsZjQJ1GyysetfJhAfL4p7Aa7+ukBIRg63Cjlj2vn +9yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HziGfX9PPA1ymebS6QffsOmm2qmG6S064n7K+Dxe8Rg=; b=CBaRnahONIkDDnQrpR2J0LUT8Ywh1u6gcBwdbnGi+bC5izghIP1QeP+DfSJCtZ2rUT uY2Sn7ttG2QjGj+kKWdY8z1y4lwyeUjiqiLR529wXkjCfinXmW7ojqsTLBb5Q0QW/bPs dgUIX3xsu0SnC6790PSuK4log6fJhsXZCnzIfmEk6htbvx/hCaU/6hAOkXG8Rmm5LtqQ kpBivUZA/A3q19vEHS/N7lrDTy6WU7GD6mHaTFLe61Go/heR2AK7/1qRRKckuqlVTVH+ jRpP0kp4a4C3hHOE4hZXZ+hVTgKGLetxXcbMAbkDdRten6j2avps3RpE7L3xKwzcMv3Y xMoA== X-Gm-Message-State: AJcUukdTZFk1xP5zFroC/mH3AnMmJKMOGGVQyZEQ5tre6IIPHDm14Jvq sQBJvNoOsYLryUd+ENPe8JododMuP90= X-Google-Smtp-Source: ALg8bN7xYwsRp5Pzb5JJX7u3E7JZreTbVWfdqEKBu8yDiu5ho9sJ8JmrQRVg3JxrPlKrbDKWlIWRqQ== X-Received: by 2002:a17:902:d202:: with SMTP id t2mr18076575ply.193.1547280234428; Sat, 12 Jan 2019 00:03:54 -0800 (PST) Received: from localhost ([2406:3003:2002:40c2:7952:f8f0:5b6c:6fa3]) by smtp.gmail.com with ESMTPSA id w5sm105247889pfn.89.2019.01.12.00.03.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 00:03:53 -0800 (PST) From: Jason Zaman To: selinux-refpolicy@vger.kernel.org Cc: Jason Zaman Subject: [PATCH 2/5] files: introduce files_dontaudit_read_etc_files Date: Sat, 12 Jan 2019 16:03:41 +0800 Message-Id: <20190112080344.10031-2-jason@perfinion.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190112080344.10031-1-jason@perfinion.com> References: <20190112080344.10031-1-jason@perfinion.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Signed-off-by: Jason Zaman --- policy/modules/kernel/files.if | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index e9bc8dd9..f1c94411 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -3403,6 +3403,25 @@ interface(`files_dontaudit_read_etc_runtime_files',` dontaudit $1 etc_runtime_t:file { getattr read }; ') +######################################## +## +## Do not audit attempts to read files +## in /etc +## +## +## +## Domain to not audit. +## +## +# +interface(`files_dontaudit_read_etc_files',` + gen_require(` + type etc_t; + ') + + dontaudit $1 etc_t:file { getattr read }; +') + ######################################## ## ## Do not audit attempts to write -- 2.19.2