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=-2.2 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 35FCDC282F6 for ; Mon, 21 Jan 2019 08:40:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A81020861 for ; Mon, 21 Jan 2019 08:40:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="AySRq9Xo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729442AbfAUIkC (ORCPT ); Mon, 21 Jan 2019 03:40:02 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:42855 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728824AbfAUIkC (ORCPT ); Mon, 21 Jan 2019 03:40:02 -0500 Received: by mail-qt1-f194.google.com with SMTP id d19so22669858qtq.9 for ; Mon, 21 Jan 2019 00:40:01 -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=4U7cx7EHSbkIRyj7hO+4Hz+LI9k82LGvG5GEY2HiLdo=; b=AySRq9XoFY678C5ZmKoUGGNs/hv0QArfTvCpwsrTkDTA9k0oSzpS/y/bQzHbabUXWd PUvMKNSu9tdDB0RAWDdlWEerOz6ZXCTPlcsuG0SGnJ/kx0ANQ/n70X3keJM81KwVBs5q +Di4CXJ/cSbAqrOp0568X283UbtlVA+Na8Bhc= 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=4U7cx7EHSbkIRyj7hO+4Hz+LI9k82LGvG5GEY2HiLdo=; b=RAJRUBEAwnzpjY8HgJNG/OlAtdlLUCvTCm42/pwHlDvDt0yOlsle4Lm955u243SIkz l5taS4+UVUrd/qgGSvvYYLs3pjSBsrQZXE4dxQezGoAWfZB1ugk3hjoEOEhZ0HieHBsM KmENtepcgqbwEkp8Lp7vQbt6YDsUd3x16Ac4/G/jexclVl3usVVSqb9zXv3AvD9o8CAq kTAz9KrEH6ASjFaUDkpas8fXxMAnGO2W58Cenna/3It/Yd2AM/jCeKTJfBGx4Ax0JauH rLMAIKRAUG4dLN3nmE0ah1u0VkULcR/hiszjcQqMhSqCNf1ET92nDna9oeRP/i+ETlNu M8fQ== X-Gm-Message-State: AJcUukc4S/2CysjbQZdkNAklf1khjPWUy3iIpIyde+aUvg+WOOmqUyYi K6MmspXW5sE+mwyJu2CJMo6l+pVh4Us= X-Google-Smtp-Source: ALg8bN74D7AXkFITpVgQEZcoqSSjHpNnE5n98mpqO2xZSIF4a3LTs1QaUFclUgnzp+Tb4d8RcCA51g== X-Received: by 2002:ac8:4595:: with SMTP id l21mr22920563qtn.124.1548020769067; Sun, 20 Jan 2019 13:46:09 -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 s46sm64555044qtc.63.2019.01.20.13.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jan 2019 13:46:08 -0800 (PST) Subject: Re: [PATCH] more tiny stuff To: Russell Coker , "selinux-refpolicy@vger.kernel.org" References: <20190119120444.GA1199@xev> From: Chris PeBenito Message-ID: Date: Sun, 20 Jan 2019 16:22:13 -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: <20190119120444.GA1199@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/19/19 7:04 AM, Russell Coker wrote: > I think the old timesync labelling wasn't working anyway due to -- for a > directory name. > > A couple of patches for devicekit calling dmidecode (this is part of replacing > some kmem access that was discussed on this list and rejected as a misfeature > in Debian DMI related code ages ago). > > The rest should be obvious. > > Index: refpolicy-2.20180701/policy/modules/services/ntp.fc > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/services/ntp.fc > +++ refpolicy-2.20180701/policy/modules/services/ntp.fc > @@ -32,7 +32,7 @@ > /var/lib/ntp(/.*)? gen_context(system_u:object_r:ntp_drift_t,s0) > /var/lib/sntp-kod(/.*)? gen_context(system_u:object_r:ntp_drift_t,s0) > /var/lib/systemd/clock -- gen_context(system_u:object_r:ntp_drift_t,s0) > -/var/lib/private/systemd/timesync(/.*)? -- gen_context(system_u:object_r:ntp_drift_t,s0) > +/var/lib/systemd/timesync(/.*)? gen_context(system_u:object_r:ntp_drift_t,s0) > > /var/lock/ntpdate -- gen_context(system_u:object_r:ntpd_lock_t,s0) > > Index: refpolicy-2.20180701/policy/modules/admin/dmidecode.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/admin/dmidecode.te > +++ refpolicy-2.20180701/policy/modules/admin/dmidecode.te > @@ -32,3 +32,9 @@ mls_file_read_all_levels(dmidecode_t) > locallogin_use_fds(dmidecode_t) > > userdom_use_inherited_user_terminals(dmidecode_t) > + > +ifdef(`init_systemd',` > + # inherits /dev/null and a socket from devicekit_disk_t > + init_use_fds(dmidecode_t) > + init_rw_inherited_stream_socket(dmidecode_t) > +') > Index: refpolicy-2.20180701/policy/modules/services/devicekit.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/services/devicekit.te > +++ refpolicy-2.20180701/policy/modules/services/devicekit.te > @@ -177,6 +177,10 @@ optional_policy(` > ') > > optional_policy(` > + dmidecode_domtrans(devicekit_disk_t) > +') > + > +optional_policy(` > fstools_domtrans(devicekit_disk_t) > ') > > Index: refpolicy-2.20180701/policy/modules/services/xserver.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/services/xserver.te > +++ refpolicy-2.20180701/policy/modules/services/xserver.te > @@ -291,6 +291,8 @@ kernel_request_load_module(xauth_t) > > domain_use_interactive_fds(xauth_t) > > +dev_read_sysfs(xauth_t) > + > files_read_etc_files(xauth_t) > files_search_pids(xauth_t) > > Index: refpolicy-2.20180701/policy/modules/system/unconfined.te > =================================================================== > --- refpolicy-2.20180701.orig/policy/modules/system/unconfined.te > +++ refpolicy-2.20180701/policy/modules/system/unconfined.te > @@ -59,6 +59,9 @@ ifdef(`direct_sysadm_daemon',` > ') > > ifdef(`init_systemd',` > + # for systemd-analyze > + init_service_status(unconfined_t) > + > optional_policy(` > systemd_dbus_chat_resolved(unconfined_t) > ') Merged. -- Chris PeBenito