Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp847666ybp; Fri, 11 Oct 2019 05:25:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEchf4E6NnbbH9iP6tY0O9dd0lTpKZeV1kNU7Z2qb4e7Xby53Tnd/IXOwm8uJDT9q12uIh X-Received: by 2002:a17:906:ce2e:: with SMTP id sd14mr13809034ejb.197.1570796705607; Fri, 11 Oct 2019 05:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570796705; cv=none; d=google.com; s=arc-20160816; b=tFja4KHlHR2cKnHuHORVGwnyh92FLWhbQ8YNvuAPKOVvedKpF3AFleertQPPoobRz8 CKwxPSvRKiEoS7bBcQW/SJUp6nOE7aCqgWx38CUhoQvg7ZfMxLL+mH2Gbx9L5tzhVsM7 GlcmGv7RACwacomcxMHLgoCorNZrG7IhYFP/3EvxRZ0VCq4JmXYOlzNAtJrS5XAiwXDL oF+4MZTRCKrlEmSmGNRXSNgVZGf4q1keEzx99XzlXFfNXwSkBElYJjlaRw9j2SrniVfE egaPLjDOhCm3vfvrv97DxidP7e9sHsKH1lqsk+mT1QHqMzlLhGQOlAtta1If33FLBWb5 65Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CbLaLmJb/wyG6LYTFHxahqLB2wb7hUqms2/mMpgPIPg=; b=q9Iosh3skAiZ57axajZHm+UQz5X61HWbDnaEEWFBIYPl3knypP2PFuR1D2f0xX755c 20NoE/GpKfemOKeiso7tk3zI9TuDnWP9YdNoZVtlo+bNK7qNkVZuIZgCXiIJiS/Fa8od qeP1h5Q5jM67+unAyfPYtBdcpsb8u9t0Qy4QYfeeoy3k4T7n2WT6gX285OTw+6psgzFy T4LAdOdpLr9/xdWDie0evlFnWBxJP/gxGjdeBUpiENWK4jnsaV+tDuenj7Cw6ixWL5ky 8swDTtesP6cS92Qp/6zzpdYVOBVMPsWj4yt3HAIy2kfz2iQzXi8ccgXbY8k3pCl8NhAG TvpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bigon.be header.s=key1 header.b=sq41Fv+c; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si5130303ejx.282.2019.10.11.05.25.02; Fri, 11 Oct 2019 05:25:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bigon.be header.s=key1 header.b=sq41Fv+c; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728095AbfJKMYV (ORCPT + 11 others); 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 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