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=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT 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 D986EECE598 for ; Fri, 11 Oct 2019 12:24:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B35892190F for ; Fri, 11 Oct 2019 12:24:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=bigon.be header.i=@bigon.be header.b="sq41Fv+c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728095AbfJKMYV (ORCPT ); Fri, 11 Oct 2019 08:24:21 -0400 Received: from ithil.bigon.be ([163.172.57.153]:38270 "EHLO ithil.bigon.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727907AbfJKMYV (ORCPT ); Fri, 11 Oct 2019 08:24:21 -0400 Received: from localhost (localhost [IPv6:::1]) by ithil.bigon.be (Postfix) with ESMTP id 419B72032B for ; Fri, 11 Oct 2019 14:24:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bigon.be; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=key1; t=1570796658; x=1572611059; bh=NNP0mbmaHvDt3lc+uvcn19ejnxWwBKaSfRYJ52FMlQM=; b=sq41Fv+cCNmZ /CTc6VrQ8Cvj/mekPfuKkcz0IuQOF7jH/sEi4ll1mU7EG/FKoDhg0V9asCedH7EF yYYS7GY5YCRX0PgYWJbm/4p7w7gHd0WPAd/6YDf+yF6jRlbdXSCHaOFS5mZ1SnWs I55dwWmdunTlkQnsQi+lJbcAC9dgjRc= Received: from ithil.bigon.be ([IPv6:::1]) by localhost (ithil.bigon.be [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id SdhutNua7zwY for ; Fri, 11 Oct 2019 14:24:18 +0200 (CEST) Received: from edoras.bigon.be (unknown [193.53.238.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bigon@bigon.be) by ithil.bigon.be (Postfix) with ESMTPSA for ; Fri, 11 Oct 2019 14:24:18 +0200 (CEST) Received: from bigon (uid 1000) (envelope-from bigon@bigon.be) id 21ce7 by edoras.bigon.be (DragonFly Mail Agent v0.12); Fri, 11 Oct 2019 14:24:16 +0200 From: Laurent Bigonville To: selinux-refpolicy@vger.kernel.org Subject: [PATCH 05/10] Allow colord_t to read the color profile stored in ~/.local/share/icc/ Date: Fri, 11 Oct 2019 14:24:11 +0200 Message-Id: <20191011122416.14651-5-bigon@debian.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191011122416.14651-1-bigon@debian.org> References: <20191011122416.14651-1-bigon@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Archived-At: List-Archive: List-Post: From: Laurent Bigonville colord reads the color profiles files that are stored in ~/.local/share/icc/, The file descriptor to that file is passed over D-Bus so it needs to be inherited ---- time->Sat Oct 5 11:35:54 2019 type=AVC msg=audit(1570268154.991:223): avc: denied { read } for pid=852 comm="gdbus" path="/home/bigon/.local/share/icc/edid-fcd2cc06dec015794261e6b7756cbcec.icc" dev="dm-3" ino=413402 scontext=system_u:system_r:colord_t:s0 tcontext=unconfined_u:object_r:xdg_data_t:s0 tclass=file permissive=1 type=AVC msg=audit(1570268154.991:223): avc: denied { use } for pid=852 comm="gdbus" path="/home/bigon/.local/share/icc/edid-fcd2cc06dec015794261e6b7756cbcec.icc" dev="dm-3" ino=413402 scontext=system_u:system_r:colord_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=fd permissive=1 ---- time->Sat Oct 5 11:35:55 2019 type=AVC msg=audit(1570268155.007:225): avc: denied { getattr } for pid=852 comm="colord" path="/home/bigon/.local/share/icc/edid-fcd2cc06dec015794261e6b7756cbcec.icc" dev="dm-3" ino=413402 scontext=system_u:system_r:colord_t:s0 tcontext=unconfined_u:object_r:xdg_data_t:s0 tclass=file permissive=1 ---- time->Sat Oct 5 11:35:55 2019 type=AVC msg=audit(1570268155.007:226): avc: denied { map } for pid=852 comm="colord" path="/home/bigon/.local/share/icc/edid-fcd2cc06dec015794261e6b7756cbcec.icc" dev="dm-3" ino=413402 scontext=system_u:system_r:colord_t:s0 tcontext=unconfined_u:object_r:xdg_data_t:s0 tclass=file permissive=1 ---- Signed-off-by: Laurent Bigonville --- policy/modules/services/colord.te | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/policy/modules/services/colord.te b/policy/modules/services/colord.te index fada3fb8..2fbb1835 100644 --- a/policy/modules/services/colord.te +++ b/policy/modules/services/colord.te @@ -141,6 +141,13 @@ optional_policy(` udev_read_pid_files(colord_t) ') +# colord reads the color profiles files that are stored in ~/.local/share/icc/, +# The file descriptor to that file is passed over D-Bus so it needs to be inherited +optional_policy(` + unconfined_use_fds(colord_t) + xdg_read_data_files(colord_t) +') + optional_policy(` xserver_read_xdm_lib_files(colord_t) xserver_use_xdm_fds(colord_t) -- 2.23.0