Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2364354ybp; Sat, 12 Oct 2019 08:52:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBCJmYHgtDakyv2XsQOrlruaLdx1dzdVtRIr5DyaWKcF69mpMNM8eWRuixfDZMLKNvFqfo X-Received: by 2002:a17:906:4d44:: with SMTP id b4mr20654606ejv.105.1570895543951; Sat, 12 Oct 2019 08:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570895543; cv=none; d=google.com; s=arc-20160816; b=lAIzHFLpZ2OS3Sl7z3R8ZZp/egu4VP1aO5L3rvkDcLb2FcEKhYmJpT0T/LjM2HWvKD n7Al0S4HviCqSmSWlHMMUE8R3PuQ7iPtemASfnWP0GuaS1093Pi9nvHjtrvvARoeAYf7 LHazyk/fPnqe3J3mD8rYWBci9+Uha60xaoUhJGR9yxgloXDL8wQE5SYCEuYG5u5Nz6HB GhWAa0TH5U8h+VEaysrms+rsKqC+DeFXF8P0cn8LPFcK+BX8vOrqLNrhPdBz4p3bbwFC FHdNrqI7y1of4+G1/H94V/4x0CkOEHDYu+MEiZFoBia0QogR/fn4DEVvt5W7CEVQcDWO Y9+A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=jkbXyy1vELXLiiq4K68WCPGW8V/chRlY9XDWUODqny0=; b=O/mBupDCT046LQ9wKySHu6uNEE6WlhBuGqbudH2ODu03xxv243jnNINEG8MP7ZMCpH O780q49ODE5o+YUqmLrpZgpgH8DLcJbH+ZzkkF+sAXKsXvtA0XvIFQI3spsGofRD/CI3 ePDaigTgCBDxmSLd38OuYfCwY89jE7fJTcIafInxhgWEN/SNga8uOvaBo3Ir2JLm6l2s Pf2hDQZnXVPA6Y/QJkOY0lfa3ltj9r2qiMTLNbjErBqJefZmNL6u9D67Zcwr6mMQCw10 EI8lZS+h8Tq34WmLaNKNZ9a2N+VCc2FbgROolu827QJCN2B8le7sdYuPiMcUbcrz2vrb +i+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b="Ag/P4O7W"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si8049270eje.151.2019.10.12.08.52.18; Sat, 12 Oct 2019 08:52:23 -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=@ieee.org header.s=google header.b="Ag/P4O7W"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728636AbfJLPvt (ORCPT + 11 others); Sat, 12 Oct 2019 11:51:49 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:36472 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727939AbfJLPvs (ORCPT ); Sat, 12 Oct 2019 11:51:48 -0400 Received: by mail-qt1-f196.google.com with SMTP id o12so18549636qtf.3 for ; Sat, 12 Oct 2019 08:51:46 -0700 (PDT) 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=jkbXyy1vELXLiiq4K68WCPGW8V/chRlY9XDWUODqny0=; b=Ag/P4O7WKDdIk2lOHtktqt9d8g1fcP/u2W5Wkd+8gISeQz1o7qpzIQjKJi5hfr5sZK EX8GnsePERsmoMfqYHF3y5Uf1QspmHmsMkoK68AweuvdxC+sq5VkOYOHsgid5Un/jY7P YtoLnviqyqj848tQhkcMQVvf9/dqvuj7cYNQc= 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=jkbXyy1vELXLiiq4K68WCPGW8V/chRlY9XDWUODqny0=; b=kIhToV7Qu62DZJb4vQw6OwMFzNleK5PayAi5AUeob2YnDYG1wc/EAALvNCWgWLc7FM uv1qVUWK2T4XmSJ3CbTgoJB9YUuEG2xhUQEOnRiY4/GGVvC22y0iaK5DunFYfk9Tu2VW AS4eOJIrniSHczeh7ycbF8csq/esEQzZdaiyiq9WGZmMEr7on2nLthai3+w/KoYVUXXs 0fgc00n50D5fGXEfZ9L1WZyRH5njblPAuIyNUDl8wn8JjcbgO8XKOr2GtkTs91tu76Uz i6ChSgixBE2X6hcfja4mQiYcyQfkeuukTnwGCzA7raxmtr4mpH6dCLC/DeXDfXsR0hQn VDGg== X-Gm-Message-State: APjAAAXYRDhBBsubsKDzTHM3VFJLf8TmKmf738n1h3G3DAsYnRI2gbY/ T+NuKtB0d0r/YDnnsFlMvJh9KVNDQWo= X-Received: by 2002:ac8:1346:: with SMTP id f6mr11855014qtj.46.1570895506103; Sat, 12 Oct 2019 08:51:46 -0700 (PDT) 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 w6sm5404351qkj.136.2019.10.12.08.51.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Oct 2019 08:51:45 -0700 (PDT) Subject: Re: [PATCH 05/10] Allow colord_t to read the color profile stored in ~/.local/share/icc/ To: Laurent Bigonville , selinux-refpolicy@vger.kernel.org References: <20191011122416.14651-1-bigon@debian.org> <20191011122416.14651-5-bigon@debian.org> <20191011125423.GA279944@brutus.lan> <20191012075320.GA716332@brutus.lan> From: Chris PeBenito Message-ID: Date: Sat, 12 Oct 2019 11:51:43 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20191012075320.GA716332@brutus.lan> Content-Type: text/plain; charset=windows-1252; 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 10/12/19 3:53 AM, Dominick Grift wrote: > On Fri, Oct 11, 2019 at 02:54:23PM +0200, Dominick Grift wrote: >> On Fri, Oct 11, 2019 at 02:24:11PM +0200, Laurent Bigonville wrote: >>> 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 >> >> This patch is cutting corners a little. It only takes unconfined_t into account and not the confined users (an alternative would be to call "userdom_use_all_users_fds(colord_t)" instead. Which is arguable too broad as well but closest you can get to "common users" without surgery. >> Secondly xdg_read_data_files() is a little broad. >> Also if this patch implies that whatever maintains XDG_DATA_DIR/icc is able to maintain generic xdg data files, which is arguable broad as well. >> >> The second and third argument are subject to how far you want to take things, and so I won't object if that is not addressed. >> The fd use issue, in my view, should be addressed for all login (common) users with colord access. > > Actually, I take this review back. I am not sure how to best deal with this fd. It seems that going to a colord_role() would be the way to go. There already is a colord_dbus_chat($1_t) in userdomain.if, so you could put those dbus rules plus the rules to address the fds together. I agree the xdg_read_data_files() is somewhat broad, but it seems like xdg_data_t files aren't sensitive. Maybe that's just how it is on system? I don't feel strongly on this. -- Chris PeBenito