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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 72924C61CE4 for ; Sat, 19 Jan 2019 12:14:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AE5320821 for ; Sat, 19 Jan 2019 12:14:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DlDAjz0i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727938AbfASMOw (ORCPT ); Sat, 19 Jan 2019 07:14:52 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:39671 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727915AbfASMOw (ORCPT ); Sat, 19 Jan 2019 07:14:52 -0500 Received: by mail-ed1-f68.google.com with SMTP id b14so13195730edt.6 for ; Sat, 19 Jan 2019 04:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=cnVmnJRNDlC5tKM+jqYmsI68kyFCNZTMn2sSG8Flgcs=; b=DlDAjz0i5Nkyorro4xOzfPQ6VCDXu2dFZuSF2e+Y29bfGF9SU1vuYLl17TIokyIm/P aJtgom/P0mh8agou15v/IpyDIb5YuqUP5jzQK2wJFVHDWiwWmdg9pYBHMV3h645X2fKT aGtfcesY/qQSYpDWoHCeHpPlHu+XBAFRAW0u/i0xoM39NdHXVwKvmKC6Lqm9BrvmG/J6 Mddviyspee7ZBfDFegoU6cXAl538kqV8DtIrFC5jDwzs94lX0hpcU758H9c00LfPU1ZI v9YfWxSZMNc5AmDTg4eFxnNczQXnkbHA87DvNsvGCrJ4R+Li4fOjEuRCcGdRSwDFjneo tBZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=cnVmnJRNDlC5tKM+jqYmsI68kyFCNZTMn2sSG8Flgcs=; b=iONibuRmIaYJhp+maTmmPvkIPskH4P3+0mdgQwEzA7zZSov7uQCuFXRTz0vpacVA5v 9twg7CcLeovOiS2AobNbcPhIKBJTKVrd4XBuuJjMKj2BtXMmNk7IEnv16S94kKQSojmn a9r5hyDFPM3f97GAx/08zUmezs/hu87PRvBJwzQIXRdJDW4Jq6sCKv0OmI1sa/TRmxNT XPFSLkvg5TYeMeMpRIyBUZT6l5aR0BVA38Bj03tEWZnvAkmyQuuwWDLj66HBZEYxW0k/ 4ttJ2eDKS6MoxN5IueHttAd0MCBobbjlRt17L3dDdj9Lm2U8+0vbBxBAll2RJYF7Jsq4 mgzQ== X-Gm-Message-State: AJcUukcu19D1RpxfH2MDJQz0AY0CqoZm5+znMT5INeHHEPqEpTkr5B31 NmNN+MP/9nmt729egYjIoYZ3boRQ X-Google-Smtp-Source: ALg8bN44ra2QwUBgABMTSuM3BqN8gvUVYe/WRP6+5NyBpjm7X1eOz8i5aZk2zD9jR/ZSxkK3/S86bA== X-Received: by 2002:a17:906:c9c4:: with SMTP id hk4-v6mr17875458ejb.249.1547900090402; Sat, 19 Jan 2019 04:14:50 -0800 (PST) Received: from brutus ([2001:985:d55d::438]) by smtp.gmail.com with ESMTPSA id r1sm7565195eds.1.2019.01.19.04.14.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Jan 2019 04:14:49 -0800 (PST) From: Dominick Grift To: Russell Coker Cc: "selinux-refpolicy\@vger.kernel.org" Subject: Re: [PATCH] more tiny stuff References: <20190119120444.GA1199@xev> Date: Sat, 19 Jan 2019 13:14:49 +0100 In-Reply-To: <20190119120444.GA1199@xev> (Russell Coker's message of "Sat, 19 Jan 2019 23:04:44 +1100") Message-ID: <875zuk269y.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Russell Coker writes: > 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) Yes that and systemd-timesync no longer uses DynamicUser= and so /var/lib/private no longer applies Also refpolicy should consider making /var/{lib/private,cache/private,log/private} equivalent to /var/lib, /var/cache and /var/log respectively > > /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) > ') -- Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift