Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1666506ybb; Thu, 9 Apr 2020 06:49:47 -0700 (PDT) X-Google-Smtp-Source: APiQypKiUYj8FLugyQaNbYoGC8v/NhnjCh+0Ffq8HYjtwCIoM/CleYCHhnDMFl8MAOLfXqMnf6Ah X-Received: by 2002:a05:620a:670:: with SMTP id a16mr4758710qkh.467.1586440187481; Thu, 09 Apr 2020 06:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586440187; cv=none; d=google.com; s=arc-20160816; b=xQmsnsJmp9jC7KYvj+GJviEWqch350Bb0tyswsQZb37hsaceJlWcy+ip5etA0eEsUN A4XBD3ZKNBKnpUxjKWn6iv4LAyoIqT/fu9WcgQRkSIm70IqgIVwIBy/fFRcPDRMHpG79 3TkJSxVTGfluod92aO972P4BhSFJ5wSMIyM5B7rcCWLIr2QU180Ho3gz/63jZC1kF+Rm 8zfZDLikrq+3SOL+p5qn35086S2E5Hh2VvsjJsNQFrwp1wYBlwOJKtUZbAgePf9YU33B KlGMffx66QcA21eN2tHPuB93jA/1ozhYzw34tyS9vdjFRKmTtWfXGXVKipOb1Gp1K+Qt OqrA== 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:cc:to:subject:dkim-signature; bh=xpzro6WIbts+/TGlysnKNwJjKBBsc3PjhyxC2MFC8j8=; b=bQWBsTMpuUMiWT2xUYSjhK+JkTL2iDXCBVYihWuFz4bCdFZDEfUIlD+CjhqOvOhYXB bmn3IrIQ5oQm2EU4ElyCqE55KtNFX/z3RoX9N/QUoyTC5A7mKq9ZOJcBKaHYCzSdUDBl UP0h62pNIRtFDn1N3knMe59fGgHYcgmgl+2tNvHXm6xjBHJWVzn6yVaCd6HEo0wBrZvz 83kXiLcAkRoNSp+R8p443yZfX5aDaVvOoYN1H4zaw8H/mWZlohD2nXrOlUTrHNuboWE4 7h9xYMmctLnQ+Klkqe7nXBWteg07MUgCP7vsMJV+9WSiMdweiMdJrZgWsYiLveH81a5O I+DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=WvQNmqJN; 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 o5si5602554qtm.102.2020.04.09.06.49.44; Thu, 09 Apr 2020 06:49:47 -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=WvQNmqJN; 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 S1726950AbgDINtS (ORCPT + 13 others); Thu, 9 Apr 2020 09:49:18 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:42716 "EHLO mail-qk1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbgDINtS (ORCPT ); Thu, 9 Apr 2020 09:49:18 -0400 Received: by mail-qk1-f177.google.com with SMTP id x66so3923208qkd.9 for ; Thu, 09 Apr 2020 06:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xpzro6WIbts+/TGlysnKNwJjKBBsc3PjhyxC2MFC8j8=; b=WvQNmqJN7X0rdSNyKQfe0ych49Q/go0laM9OEJkJ1dXg3oB89wJ4wZJGcrHWa8EHox Sxm1M7YJN10PtLCHXz5w1+9HarHkQvnEkSIkWXDt8s1LHjG6Xxp32PfMkZWyE0ShY1ae T10+YQiKs2GKpwNf/FciWIEympFvvJ/qtQatc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xpzro6WIbts+/TGlysnKNwJjKBBsc3PjhyxC2MFC8j8=; b=iMGYFuZ7zT50u85iXBS8tCztUbvU+hxJtvfT8iTCKiBZuJh6zuJf7ZfErHZeBItZ3X 0z8aK3/emfbXTQ/ZKwkNgLoDWbn9h1AJOIPVuL7sOMMbcl2CXQYwECGnOdbBYDVYuF3Z w2DIIF+X5bGhJgvvJ4OMKgBTTa360s8YVuNYc8J5PV1vtSDv5km1uCakemWeIUFt/SPM aoTrDUrYGVc3WI0I8u0+B5DMoTF/wkeRsNQcNSzKRTKdWPnLaS1rDyrNr9xjnaP4NkoC fyBFeR/m5UISwBWXbIbPc/qLNO9t0BTRJmWA4SJANaJCFaCNEXFEqfNfbsQs5FXNLCgF +V+w== X-Gm-Message-State: AGi0PuaP8MPeQVjUn8Q+OfTPr6c52mavXdGBG2nYy6WjisfsgzblivzB W4KmbOlybMk1E6y37r18JCGFJBLQ0hg= X-Received: by 2002:a37:b002:: with SMTP id z2mr12607877qke.289.1586440157202; Thu, 09 Apr 2020 06:49:17 -0700 (PDT) Received: from fedora.pebenito.net (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id t15sm7469889qtc.64.2020.04.09.06.49.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Apr 2020 06:49:16 -0700 (PDT) Subject: Re: systemd_user_runtime_dir_t To: Russell Coker , Topi Miettinen Cc: selinux-refpolicy@vger.kernel.org References: <2379388.043O1XupSG@liv> <3285433.FrU4F1G8SV@liv> From: Chris PeBenito Message-ID: <01acc6a9-8c66-2c64-bfe2-3b44274c366e@ieee.org> Date: Thu, 9 Apr 2020 09:47:54 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <3285433.FrU4F1G8SV@liv> 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 4/8/20 2:48 AM, Russell Coker wrote: > On Wednesday, 8 April 2020 4:43:32 PM AEST Topi Miettinen wrote: >> On 8.4.2020 5.19, Russell Coker wrote: >>> What kind of name is that? It's a poor choice of name by systemd upstream >>> and I don't think we are obliged to copy that bad idea. >> >> The name is related to environment variable XDG_USER_RUNTIME_DIR, which >> is not systemd specific construct: > > That's a fine name for an environment variable, clearly indicating that it > points to a directory. > > It's a poor name for a domain, making a casual observer think it's a type for > a directory not a domain for a process. > >> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html >> >> So if the name should change, xdg_user_runtime_dir_t might be more >> accurate. > > It would be more accurate to have a name that reflects the function of managing > the directory in question. > >> On the other hand, the current name reflects that it's >> specifically the service supplied by systemd called >> "runtime-user-dir@.service" which provides the directory. If the >> provider would be something other (/etc/init.d/elogind-mkuserdir), it >> could be equally accurate to label the directory with something else. > > If the provider changed to a different process (theoretically we are supposed > to be able to swap out parts of systemd for equivalents) then it should have > the same domain name. > >> Though if the result (temporary directory owned by the user) is no >> different in either case from the point of view of SELinux policy, why >> change? > > SE Linux is difficult enough to understand without making things needlessly > confusing. You're right. I wasn't pleased when I came across it. However, the way I see it, the direction you suggest is confusing in a different way, since it doesn't obviously align with the systemd command name. I see it as being between a rock and a hard place, so I'm inclined to keep it as-is. This isn't a domain that is going to show up all over the place, it is a microscopic niche of the byzantine set of processes under the systemd umbrella. -- Chris PeBenito