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 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 D3C39C43381 for ; Fri, 8 Mar 2019 00:03:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A1ED12081B for ; Fri, 8 Mar 2019 00:03:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="MN+BGVMG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbfCHAD2 (ORCPT ); Thu, 7 Mar 2019 19:03:28 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:46556 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbfCHAD2 (ORCPT ); Thu, 7 Mar 2019 19:03:28 -0500 Received: by mail-qt1-f194.google.com with SMTP id z25so19340089qti.13 for ; Thu, 07 Mar 2019 16:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=CaocMfj3a6EI5AYGYyZ/8rnoAsgNqwhXtstWubs5PZw=; b=MN+BGVMGJUulAUAnhuzj2wfE76TRlGNkqunOUuYrROhffmtl+qK7Fs7v3nKJ1MO10S SRxl/UFfkNIUSpUczb7gz0y+tbq42Lrz2hJzw5IpVyTgK+r9HNWCSHs1QbFtTHoRrw7m KqlH10twdviPVv/srEAVS9NpdnyGYfezMYKOY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CaocMfj3a6EI5AYGYyZ/8rnoAsgNqwhXtstWubs5PZw=; b=piQ2La7NaEtmpJ93CbSEWvniENKPv8KZwhO64fLxIY1Z21CBiFy1v1+EiCCVU4P3ji unoImt4jwvmgV3JCZ4UP+najZzxLbf2AtoET1xAPEB5iDlPno0YzKRo3j9pF/4IrOOhh Lh+dginDKLeAJraJKK6dQmpxjheGkno0zgbXdyTuYyrPrKrDr5kHKXjV4QViDLkhtBvC oJyJS3vapip//P3YOVBL1GkS8MsKYZsqMQ0R/zN8DIhq//9chWVF41ocxhoA7Ob7S2Jp w7Ugc7G6Lk/kOBTLZKiJo19Re712cTMFfjTbium8/mod/8SGuBxTmCmmF9wPq+LJJMGh ja0Q== X-Gm-Message-State: APjAAAXa7P2TYxF3OfnWLnCWGjCcR0sxr5Y/Hhl7eV/KuvPgXowkJaLp mYf+axDbdiSSYJ/d+si0SzVjLssOVk4= X-Google-Smtp-Source: APXvYqyYO4O5PYelPjKPWRi0lbsTCPds0DOyURluUsn3hcEIa44ZS6EVJGxEv29c/fu9loyolwFokQ== X-Received: by 2002:a0c:d0b7:: with SMTP id z52mr12888210qvg.94.1552003407293; Thu, 07 Mar 2019 16:03:27 -0800 (PST) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id n27sm452717qtf.11.2019.03.07.16.03.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 16:03:26 -0800 (PST) Subject: Re: [PATCH] Allow map permission when reading hwdb To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190306190618.9089-1-dsugar@tresys.com> <20190306190618.9089-2-dsugar@tresys.com> From: Chris PeBenito Message-ID: <3ccf4761-a63a-f8f1-c52d-73c797892f8e@ieee.org> Date: Thu, 7 Mar 2019 18:56:01 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190306190618.9089-2-dsugar@tresys.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 3/6/19 2:07 PM, Sugar, David wrote: > I'm seeing a denial for udev to map /etc/udev/hwdb.bin. > This updates the existing interface to include allowing > to map the file. > > type=AVC msg=audit(1551886176.948:642): avc: denied { map } for pid=5187 comm="systemd-udevd" path="/etc/udev/hwdb.bin" dev="dm-1" ino=6509618 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_hwdb_t:s0 tclass=file permissive=1 > > Signed-off-by: Dave Sugar > --- > policy/modules/system/systemd.if | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if > index 8d2bb8da..03d83dc7 100644 > --- a/policy/modules/system/systemd.if > +++ b/policy/modules/system/systemd.if > @@ -34,7 +34,7 @@ interface(`systemd_read_hwdb',` > type systemd_hwdb_t; > ') > > - read_files_pattern($1, systemd_hwdb_t, systemd_hwdb_t) > + mmap_read_files_pattern($1, systemd_hwdb_t, systemd_hwdb_t) > ') > > ###################################### This should be a new interface. -- Chris PeBenito