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=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 AFA3DC2D0EA for ; Wed, 8 Apr 2020 06:48:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FE25206A1 for ; Wed, 8 Apr 2020 06:48:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=coker.com.au header.i=@coker.com.au header.b="rkLFacj8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbgDHGsp (ORCPT ); Wed, 8 Apr 2020 02:48:45 -0400 Received: from smtp.sws.net.au ([46.4.88.250]:53704 "EHLO smtp.sws.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbgDHGsp (ORCPT ); Wed, 8 Apr 2020 02:48:45 -0400 Received: from liv.localnet (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id 6DC59EC9F; Wed, 8 Apr 2020 16:48:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1586328523; bh=GQgITaX2yUcCq+O6P8bMWKoYRbu5PEbCdf8lkgC+nVw=; l=1716; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rkLFacj8Mfk9I9evNwgw04VR42uC/krLWsg0JtHuFAjky588g33kw0LrsIf2Ee6Ss PzWLU/20/wWjn6cwoHPyYwRia6Vo3rx/QD2Mgytepzq5MC9MpZVnWuPXkJk2tjBApk 6Pd1KTGP5hIx/Kw81PtTHtLOs8n5ysv0Q1zaazQE= From: Russell Coker To: Topi Miettinen Cc: selinux-refpolicy@vger.kernel.org Subject: Re: systemd_user_runtime_dir_t Date: Wed, 08 Apr 2020 16:48:32 +1000 Message-ID: <3285433.FrU4F1G8SV@liv> In-Reply-To: References: <2379388.043O1XupSG@liv> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org 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. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/