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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 5B96DC43381 for ; Wed, 27 Feb 2019 03:22:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E46A218D0 for ; Wed, 27 Feb 2019 03:22:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="VPkcRt+z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729313AbfB0DW1 (ORCPT ); Tue, 26 Feb 2019 22:22:27 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40868 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729128AbfB0DW1 (ORCPT ); Tue, 26 Feb 2019 22:22:27 -0500 Received: by mail-pf1-f195.google.com with SMTP id h1so7272469pfo.7 for ; Tue, 26 Feb 2019 19:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=E8l0eUz9FHsF13+Uhop1080FTJE8st3YZXYz1MBuvZQ=; b=VPkcRt+zUdlXh9Fx3WuRw3Fqgc4vR9t0hyYJ56hNomPOOv54B2RFLzU2S4/NiRYtvy SHPB5kt++elHQ+yd0ULuPUKhk8OUiqPnb5ytTmlIV8AQACuXvGw98qiW7lYBJRD/vGpP VDOGYjxFTuElGVTEUCNIHwBJRGwiq+jNmpCLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=E8l0eUz9FHsF13+Uhop1080FTJE8st3YZXYz1MBuvZQ=; b=hFZ4Asll+QYaUBl/VL6OJkWDwbS8tLx4jI6YBXxFGYF3maIqq+UeZBgHJiYWhuj/yW FPh+U4C14Im/OOdM2n2w7V1i+dIrs/g7yJ9hVtBxwaYI0F7cp+X8MQYcAv1gl7/oWayf Y3HkrW54sElvoh7GSAF4HdTEdA78Ocl51KwUCF2TuFDan2RhP+XtaG2y/+QAfMXdvH9Q 4H8Q2ohcbDOfaEhxKt/czq6GoM/joatr/A0WFHR8/y72nnZwV5yBSl/2WIIDFzrlQMvV 5KG5HuwyMv++qzHdlkL1123EEnRwwSNPuRaL3Ig0+QwSWL0+Lw4FK/8GWFwpTwoDz6lM K+vQ== X-Gm-Message-State: AHQUAuacO4oOFdT/voQJJLc3TyDOdODgtAePqkD6VgIxot/FRPDEyNj7 8N/8Q/WiUZ2Q2R+nVStFhReBGw== X-Google-Smtp-Source: AHgI3IaCuLQB1OVeoEFkxE3ekrVQq2/XYMOu0Tqiz+rijf5U5diSdEwhBKa/dB6/+0QUUOh0tSiyeA== X-Received: by 2002:a63:e101:: with SMTP id z1mr869266pgh.190.1551237746990; Tue, 26 Feb 2019 19:22:26 -0800 (PST) Received: from lenovo.pebenito.net ([173.239.195.110]) by smtp.gmail.com with ESMTPSA id p6sm25572158pgd.69.2019.02.26.19.22.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Feb 2019 19:22:26 -0800 (PST) Message-ID: Subject: Re: [PATCH] Allow AIDE to mmap files From: Chris PeBenito To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" Date: Tue, 26 Feb 2019 19:22:26 -0800 In-Reply-To: <20190225233708.15319-6-dsugar@tresys.com> References: <20190225233708.15319-1-dsugar@tresys.com> <20190225233708.15319-6-dsugar@tresys.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Mon, 2019-02-25 at 23:37 +0000, Sugar, David wrote: > AIDE has a compile time option WITH_MMAP which allows AIDE to > map files during scanning. RHEL7 has set this option in the > aide rpm they distribute. > > Changes made to add a tunable to enable permissions allowing > aide to map files that it needs. I have set the default to > false as this seems perfered (in my mind). > > Signed-off-by: Dave Sugar > --- > policy/modules/admin/aide.te | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/policy/modules/admin/aide.te > b/policy/modules/admin/aide.te > index f58ba850..fe52a280 100644 > --- a/policy/modules/admin/aide.te > +++ b/policy/modules/admin/aide.te > @@ -5,6 +5,15 @@ policy_module(aide, 1.8.0) > # Declarations > # > > +## > +##

> +## Control if AIDE can mmap files. > +## AIDE can be compiled with the option 'with-mmap' in which case > it will > +## attempt to mmap files while running. > +##

> +##
> +gen_tunable(aide_mmap_files, false) > + > attribute_role aide_roles; > > type aide_t; > @@ -43,6 +52,10 @@ logging_send_syslog_msg(aide_t) > > userdom_use_user_terminals(aide_t) > > +tunable_policy(`aide_mmap_files',` > + files_map_non_auth_files(aide_t) > +') > + > optional_policy(` > seutil_use_newrole_fds(aide_t) > ') Merged. -- Chris PeBenito