From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 F3AAEC43387 for ; Sun, 6 Jan 2019 19:14:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C49B720859 for ; Sun, 6 Jan 2019 19:14:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="f0V1nmpD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726132AbfAFTOl (ORCPT ); Sun, 6 Jan 2019 14:14:41 -0500 Received: from mail-qt1-f175.google.com ([209.85.160.175]:34756 "EHLO mail-qt1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfAFTOl (ORCPT ); Sun, 6 Jan 2019 14:14:41 -0500 Received: by mail-qt1-f175.google.com with SMTP id r14so45701084qtp.1 for ; Sun, 06 Jan 2019 11:14:40 -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=KBuQIqd4uUYtJhMtdsqTHzszjpmJBlVLs8wOT+Dc6gY=; b=f0V1nmpDiwsGFX4wJjN/2F2jmmhbi9ZEowUzPPueBwY09mA2OFBEh+j3Gv2oQV+r/j YFWzR80I+ik0J7BWXFAtCaQUdPy9HExRx4goI/1jvqEwmwE4FaWPyJFhynygyF1RSmTC N9+1afpDYkzwp/lKtrdOpdvF2oHQ107EetLJc= 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=KBuQIqd4uUYtJhMtdsqTHzszjpmJBlVLs8wOT+Dc6gY=; b=Y4CaZyZFn/y0Q+QSrVdKMUpDrgS2gXp2mWqzss3ojcZeJnXNyHJfxjn0LOqsfY2E2P owh+MDts0tRgrPXXPa2SVOhXaxy8jd7eqABy7Sxl9Y2TJXwklDglPqtuP0Eaop4YChqk rbXmYVdnoAUhFy629kOvNGEKJkMdMl0vYLzBDSSH7Kqda0AQNqy688MniRucqomzcmS7 tKQ8sV/CDhLb4RAZ6IW9zdvqqCUok2aBHprMKv9fCjREpv4OZImVgu2kkYjxc5dihp1P 57UI8ddrPbaxuaJVlXxAT1YRBvptqXVEWYtNY8hGvLVSLY5jSVUGeGDZiSf0W+hRbluq B4vA== X-Gm-Message-State: AJcUukcSK9RjKgI3k4fxDXKFwH2IJoEeozQ3ks1WEEtk63ShfyzJ8EYX q25HHMHZP15tEGSMcI3VxWXBkj1MJEw= X-Google-Smtp-Source: ALg8bN4R1T0gh4lAZhcgwi4PAfXHYCWg0E3IMoHSUI5v7EKVqstz6zK6j0lBiXdYFp1hP3JTcdX9Iw== X-Received: by 2002:a0c:f6c6:: with SMTP id d6mr48054287qvo.11.1546802079803; Sun, 06 Jan 2019 11:14:39 -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 o25sm35819754qtj.10.2019.01.06.11.14.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jan 2019 11:14:39 -0800 (PST) Subject: Re: [PATCH] missing from previous To: Russell Coker , selinux-refpolicy@vger.kernel.org References: <20190106024235.GA17569@xev> From: Chris PeBenito Message-ID: Date: Sun, 6 Jan 2019 13:50:03 -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: <20190106024235.GA17569@xev> 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 1/5/19 9:42 PM, Russell Coker wrote: > Here are the things that weren't applied from my previous patches, I think they > are all worthy of inclusion. > > Index: refpolicy-2.20180701/policy/modules/admin/apt.if > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/admin/apt.if > +++ refpolicy-2.20180701/policy/modules/admin/apt.if > @@ -171,7 +171,7 @@ interface(`apt_read_cache',` > > files_search_var($1) > allow $1 apt_var_cache_t:dir list_dir_perms; > - allow $1 apt_var_cache_t:file read_file_perms; > + allow $1 apt_var_cache_t:file mmap_read_file_perms; > ') > > ######################################## > @@ -191,7 +191,7 @@ interface(`apt_manage_cache',` > > files_search_var($1) > allow $1 apt_var_cache_t:dir manage_dir_perms; > - allow $1 apt_var_cache_t:file manage_file_perms; > + allow $1 apt_var_cache_t:file { manage_file_perms map }; > ') > > ######################################## > Index: refpolicy-2.20180701/policy/modules/system/systemd.if > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/system/systemd.if > +++ refpolicy-2.20180701/policy/modules/system/systemd.if > @@ -307,6 +307,7 @@ interface(`systemd_use_passwd_agent',` > manage_sock_files_pattern($1, systemd_passwd_var_run_t, systemd_passwd_var_run_t) > > allow systemd_passwd_agent_t $1:process signull; > + ps_process_pattern(systemd_passwd_agent_t, $1) > allow systemd_passwd_agent_t $1:unix_dgram_socket sendto; > ') > > @@ -828,3 +829,22 @@ interface(`systemd_getattr_updated_runti > > getattr_files_pattern($1, systemd_update_run_t, systemd_update_run_t) > ') > + > +####################################### > +## > +## Allow domain to list dirs under /run/systemd/netif > +## > +## > +## > +## domain permitted the access > +## > +## > +# > +interface(`systemd_list_netif',` I renamed this. > + gen_require(` > + type systemd_networkd_var_run_t; > + ') > + > + init_list_pids($1) > + allow $1 systemd_networkd_var_run_t:dir list_dir_perms; > +') > Index: refpolicy-2.20180701/policy/modules/services/ntp.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/services/ntp.te > +++ refpolicy-2.20180701/policy/modules/services/ntp.te > @@ -152,7 +152,7 @@ ifdef(`init_systemd',` > init_list_var_lib_dirs(ntpd_t) > > # for /run/systemd/netif/links > - init_list_pids(ntpd_t) > + systemd_list_netif(ntpd_t) > > optional_policy(` > unconfined_dbus_send(ntpd_t) > Index: refpolicy-2.20180701/policy/modules/system/logging.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/system/logging.te > +++ refpolicy-2.20180701/policy/modules/system/logging.te > @@ -552,6 +552,8 @@ ifdef(`init_systemd',` > init_dgram_send(syslogd_t) > init_read_pid_pipes(syslogd_t) > init_read_state(syslogd_t) > + # for /run/systemd/units/invocation:* links > + init_read_unit_links(syslogd_t) > > systemd_manage_journal_files(syslogd_t) > > See other thread for why I dropped this hunk. Otherwise merged. -- Chris PeBenito