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=-10.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,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 A6F7DC43387 for ; Thu, 10 Jan 2019 00:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76714214C6 for ; Thu, 10 Jan 2019 00:37:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="g/tfWZgN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbfAJAhO (ORCPT ); Wed, 9 Jan 2019 19:37:14 -0500 Received: from mail-qt1-f169.google.com ([209.85.160.169]:34891 "EHLO mail-qt1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbfAJAhO (ORCPT ); Wed, 9 Jan 2019 19:37:14 -0500 Received: by mail-qt1-f169.google.com with SMTP id v11so10568168qtc.2 for ; Wed, 09 Jan 2019 16:37:13 -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=dDpsbjayJ6NGEyYIWSoysFC7j6l00rfDyz2MP1VeH9I=; b=g/tfWZgNnwDI9pSjWz0GwBg1wRQCdH3hgC3HzZRRES1u8Jvtz4qTRSvoVpoBFU/89A K2bEh/Ld7S1WMCKOuo48Ixgj0VuvzrjbLd7Et3zHyj0ri7VhKlSaPkT+JP60zhKP05l5 xCfVxxE3GWbMp6t4o7Jln37aVTLttRLjYmvR8= 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=dDpsbjayJ6NGEyYIWSoysFC7j6l00rfDyz2MP1VeH9I=; b=aN/qEnKTM0bZVFolxi/gYy5vmWSdSVHx5OjkhnEdVf2pxf5GoMGgIzEpWetpTCgIGB dbo9BM47vbjFzP5HPheV64BkTAPWr9D835aByr/WY0VSWhan+rrXKluTVtfkk1WPKx1J pkDAlFlBTtrBFOzsOEEnp5fDh1t7Gp/u/nZrqpt9Ig+zHhFmMkY/h4AcJr3PyTt37mxD PT+19hmhiEhIZwGTE3X4hH/2NhB7RX43Wd6/O8Hi1ulaZA54SvDM7BTeaBfnTQq55L9K RVw0+V4Zz2la0ZiKkwNEQf9vvxTZaZtEean9W5TK91HaaaICwYXQfC+/IyZCWB3OV+i4 +sMA== X-Gm-Message-State: AJcUukcQAxZ8CZgjtoLAxT8Fzw3ZghvxheOMLU+72cOXAPVt1HYd8F8v cAw0k68W/6oLQBRvaYOum2TBxhmTays= X-Google-Smtp-Source: ALg8bN5h3JKt+nGZP7Oh7lR1IFITy4JsQJdhfY7+EVXXgFn0zkx4V8aaSl/HKd039vIXMTrs+24j/Q== X-Received: by 2002:aed:2803:: with SMTP id r3mr7560342qtd.316.1547080632644; Wed, 09 Jan 2019 16:37:12 -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 f13sm30503496qkm.52.2019.01.09.16.37.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 16:37:12 -0800 (PST) Subject: Re: [PATCH] /run/systemd/units/ links To: Russell Coker , selinux-refpolicy@vger.kernel.org References: <20190108114151.GA416@xev> From: Chris PeBenito Message-ID: <60dbf2ed-45e9-a94a-f37a-925a7c410aee@ieee.org> Date: Wed, 9 Jan 2019 19:29:25 -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: <20190108114151.GA416@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/8/19 6:41 AM, Russell Coker wrote: > This allows systemd-journald to read /run/systemd/units/ link files. > > 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 > @@ -547,6 +547,7 @@ ifdef(`init_systemd',` > init_create_pid_dirs(syslogd_t) > init_daemon_pid_file(syslogd_var_run_t, dir, "syslogd") > init_getattr(syslogd_t) > + init_read_run_links(syslogd_t) > init_rename_pid_files(syslogd_t) > init_delete_pid_files(syslogd_t) > init_dgram_send(syslogd_t) > Index: refpolicy-2.20180701/policy/modules/system/init.if > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/system/init.if > +++ refpolicy-2.20180701/policy/modules/system/init.if > @@ -894,6 +894,26 @@ interface(`init_dgram_send',` > > ######################################## > ## > +## read init /run link files > +## > +## > +## > +## Domain allowed access. > +## > +## > +## > +# > +interface(`init_read_run_links',` I guess this is a race between patches. Should be named init_read_pid_symlinks. Same feedback as GitHub PR https://github.com/SELinuxProject/refpolicy/pull/17 -- Chris PeBenito